#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer.h"
+#include "MagickCore/token.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
{
errno=EPERM;
(void) ThrowMagickException(exception,GetMagickModule(),PolicyError,
- "NotAuthorized","`%s'",read_info->filename);
+ "NotAuthorized","'%s'",read_info->filename);
return((Image *) NULL);
}
/*
image=NewImageList();
if (constitute_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&constitute_semaphore);
+ if ((magick_info == (const MagickInfo *) NULL) ||
+ (GetImageDecoder(magick_info) == (DecodeImageHandler *) NULL))
+ {
+ delegate_info=GetDelegateInfo(read_info->magick,(char *) NULL,exception);
+ if (delegate_info == (const DelegateInfo *) NULL)
+ {
+ (void) SetImageInfo(read_info,0,exception);
+ (void) CopyMagickString(read_info->filename,filename,MaxTextExtent);
+ magick_info=GetMagickInfo(read_info->magick,exception);
+ }
+ }
if ((magick_info != (const MagickInfo *) NULL) &&
(GetImageDecoder(magick_info) != (DecodeImageHandler *) NULL))
{
if (delegate_info == (const DelegateInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
- MissingDelegateError,"NoDecodeDelegateForThisImageFormat","`%s'",
+ MissingDelegateError,"NoDecodeDelegateForThisImageFormat","'%s'",
read_info->filename);
if (read_info->temporary != MagickFalse)
(void) RelinquishUniqueFileResource(read_info->filename);
{
if (IsPathAccessible(read_info->filename) != MagickFalse)
(void) ThrowMagickException(exception,GetMagickModule(),
- MissingDelegateError,"NoDecodeDelegateForThisImageFormat","`%s'",
+ MissingDelegateError,"NoDecodeDelegateForThisImageFormat","'%s'",
read_info->filename);
else
ThrowFileException(exception,FileOpenError,"UnableToOpenFile",
clones=CloneImages(image,read_info->scenes,exception);
if (clones == (Image *) NULL)
(void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "SubimageSpecificationReturnsNoImages","`%s'",read_info->filename);
+ "SubimageSpecificationReturnsNoImages","'%s'",read_info->filename);
else
{
image=DestroyImageList(image);
flags=ParseRegionGeometry(next,read_info->extract,&geometry,
exception);
size_image=ResizeImage(next,geometry.width,geometry.height,
- next->filter,next->blur,exception);
+ next->filter,exception);
if (size_image != (Image *) NULL)
ReplaceImageInList(&next,size_image);
}
}
(void) SyncImageProfiles(image);
option=GetImageOption(image_info,"delegate:bimodal");
- if ((option != (const char *) NULL) &&
- (IsMagickTrue(option) != MagickFalse) &&
+ if ((IfMagickTrue(IsStringTrue(option))) &&
(write_info->page == (char *) NULL) &&
(GetPreviousImageInList(image) == (Image *) NULL) &&
(GetNextImageInList(image) == (Image *) NULL) &&
- (IsTaintImage(image) == MagickFalse))
+ (IfMagickFalse(IsTaintImage(image))) )
{
delegate_info=GetDelegateInfo(image->magick,write_info->magick,exception);
if ((delegate_info != (const DelegateInfo *) NULL) &&
}
if ((magick_info == (const MagickInfo *) NULL) ||
(GetImageEncoder(magick_info) == (EncodeImageHandler *) NULL))
- (void) ThrowMagickException(exception,GetMagickModule(),
- MissingDelegateError,"NoEncodeDelegateForThisImageFormat","`%s'",
- image->filename);
- else
+ {
+ magick_info=GetMagickInfo(image->magick,exception);
+ if ((magick_info == (const MagickInfo *) NULL) ||
+ (GetImageEncoder(magick_info) == (EncodeImageHandler *) NULL))
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ MissingDelegateError,"NoEncodeDelegateForThisImageFormat",
+ "'%s'",image->filename);
+ else
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ MissingDelegateWarning,"NoEncodeDelegateForThisImageFormat",
+ "'%s'",image->filename);
+ }
+ if ((magick_info != (const MagickInfo *) NULL) &&
+ (GetImageEncoder(magick_info) != (EncodeImageHandler *) NULL))
{
/*
Call appropriate image writer based on image type.