From: cristy Date: Sat, 1 Oct 2011 18:22:35 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6922 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9950d57e1124b73f684fb5946e206994cefda628;p=imagemagick --- diff --git a/Magick++/lib/Color.cpp b/Magick++/lib/Color.cpp index 3a8f8b5bf..c382d45b6 100644 --- a/Magick++/lib/Color.cpp +++ b/Magick++/lib/Color.cpp @@ -196,7 +196,7 @@ const Magick::Color& Magick::Color::operator = ( const std::string &x11color_ ) PixelPacket target_color; ExceptionInfo exception; GetExceptionInfo( &exception ); - if ( QueryColorDatabase( x11color_.c_str(), &target_color, &exception ) ) + if ( QueryColorCompliance( x11color_.c_str(), AllCompliance, &target_color, &exception ) ) { redQuantum( target_color.red ); greenQuantum( target_color.green ); diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 1d53b7cbd..9fc284b7e 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -1484,8 +1484,10 @@ void Magick::Image::opaque ( const Color &opaqueColor_, PixelInfo pen; ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); - (void) QueryMagickColor(std::string(opaqueColor_).c_str(),&opaque, &exceptionInfo); - (void) QueryMagickColor(std::string(penColor_).c_str(),&pen, &exceptionInfo); + (void) QueryMagickColorCompliance(std::string(opaqueColor_).c_str(), + AllCompliance, &opaque, &exceptionInfo); + (void) QueryMagickColorCompliance(std::string(penColor_).c_str(), + AllCompliance, &pen, &exceptionInfo); OpaquePaintImage ( image(), &opaque, &pen, MagickFalse, &exceptionInfo ); throwException( exceptionInfo ); (void) DestroyExceptionInfo( &exceptionInfo ); @@ -2141,7 +2143,8 @@ void Magick::Image::transparent ( const Color &color_ ) std::string color = color_; PixelInfo target; - (void) QueryMagickColor(std::string(color_).c_str(),&target,&image()->exception); + (void) QueryMagickColorCompliance(std::string(color_).c_str(),AllCompliance, + &target,&image()->exception); ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); modifyImage(); @@ -2166,10 +2169,10 @@ void Magick::Image::transparentChroma(const Color &colorLow_, PixelInfo targetLow; PixelInfo targetHigh; - (void) QueryMagickColor(std::string(colorLow_).c_str(),&targetLow, - &image()->exception); - (void) QueryMagickColor(std::string(colorHigh_).c_str(),&targetHigh, - &image()->exception); + (void) QueryMagickColorCompliance(std::string(colorLow_).c_str(), + AllCompliance,&targetLow,&image()->exception); + (void) QueryMagickColorCompliance(std::string(colorHigh_).c_str(), + AllCompliance,&targetHigh,&image()->exception); ExceptionInfo exceptionInfo; GetExceptionInfo( &exceptionInfo ); modifyImage(); @@ -4271,7 +4274,13 @@ MagickCore::Image * Magick::Image::replaceImage if( replacement_ ) image = replacement_; else - image = AcquireImage(constImageInfo()); + { + ExceptionInfo exceptionInfo; + GetExceptionInfo( &exceptionInfo ); + image = AcquireImage(constImageInfo(), &exceptionInfo); + throwException( exceptionInfo ); + (void) DestroyExceptionInfo( &exceptionInfo ); + } { Lock( &_imgRef->_mutexLock ); diff --git a/Magick++/lib/ImageRef.cpp b/Magick++/lib/ImageRef.cpp index c736a8974..3812681c7 100644 --- a/Magick++/lib/ImageRef.cpp +++ b/Magick++/lib/ImageRef.cpp @@ -46,7 +46,7 @@ Magick::ImageRef::ImageRef ( void ) _mutexLock() { // Allocate default image - _image = AcquireImage( _options->imageInfo() ); + _image = AcquireImage( _options->imageInfo(), &_image->exception ); // Test for error and throw exception (like throwImageException()) throwException(_image->exception); diff --git a/Magick++/lib/Magick++/Include.h b/Magick++/lib/Magick++/Include.h index e98d004ca..cc7fb9d84 100644 --- a/Magick++/lib/Magick++/Include.h +++ b/Magick++/lib/Magick++/Include.h @@ -179,6 +179,9 @@ namespace Magick using MagickCore::YPbPrColorspace; using MagickCore::YUVColorspace; + // Compliance types + using MagickCore::AllCompliance; + // Composition operations using MagickCore::AtopCompositeOp; using MagickCore::BlendCompositeOp; @@ -829,8 +832,6 @@ namespace Magick using MagickCore::QuantizeImage; using MagickCore::QuantizeInfo; using MagickCore::QuantumInfo; - using MagickCore::QueryColorDatabase; - using MagickCore::QueryMagickColor; using MagickCore::QueueAuthenticPixels; using MagickCore::QueueCacheViewAuthenticPixels; using MagickCore::RaiseImage; diff --git a/MagickCore/color-private.h b/MagickCore/color-private.h index 213c6dc18..1507ba366 100644 --- a/MagickCore/color-private.h +++ b/MagickCore/color-private.h @@ -25,9 +25,7 @@ extern "C" { #include "MagickCore/image.h" extern MagickPrivate MagickBooleanType - ColorComponentGenesis(void), - QueryMagickColorCompliance(const char *,const ComplianceType,PixelInfo *, - ExceptionInfo *); + ColorComponentGenesis(void); extern MagickPrivate void ColorComponentTerminus(void); diff --git a/MagickCore/color.c b/MagickCore/color.c index 9bffc09a2..83d9f1ddd 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -1954,7 +1954,8 @@ static MagickBooleanType LoadColorList(const char *xml,const char *filename, { if (LocaleCompare((char *) keyword,"color") == 0) { - (void) QueryMagickColor(token,&color_info->color,exception); + (void) QueryMagickColorCompliance(token,AllCompliance, + &color_info->color,exception); break; } if (LocaleCompare((char *) keyword,"compliance") == 0) @@ -2182,41 +2183,6 @@ MagickExport MagickBooleanType QueryColorCompliance(const char *name, % % % % % % -% Q u e r y C o l o r D a t a b a s e % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% QueryColorDatabase() returns the red, green, blue, and opacity intensities -% for a given color name. -% -% The format of the QueryColorDatabase method is: -% -% MagickBooleanType QueryColorDatabase(const char *name,PixelPacket *color, -% ExceptionInfo *exception) -% -% A description of each parameter follows: -% -% o name: the color name (e.g. white, blue, yellow). -% -% o color: the red, green, blue, and opacity intensities values of the -% named color in this structure. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport MagickBooleanType QueryColorDatabase(const char *name, - PixelPacket *color,ExceptionInfo *exception) -{ - return(QueryColorCompliance(name,AllCompliance,color,exception)); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % Q u e r y C o l o r n a m e % % % % % @@ -2273,7 +2239,7 @@ MagickExport MagickBooleanType QueryColorname(const Image *image, % % The format of the QueryMagickColorCompliance method is: % -% MagickBooleanType QueryMagickColor(const char *name, +% MagickBooleanType QueryMagickColorCompliance(const char *name, % const ComplianceType compliance,PixelInfo *color, % ExceptionInfo *exception) % @@ -2289,7 +2255,7 @@ MagickExport MagickBooleanType QueryColorname(const Image *image, % o exception: return any errors or warnings in this structure. % */ -MagickPrivate MagickBooleanType QueryMagickColorCompliance(const char *name, +MagickExport MagickBooleanType QueryMagickColorCompliance(const char *name, const ComplianceType compliance,PixelInfo *color, ExceptionInfo *exception) { @@ -2533,41 +2499,6 @@ MagickPrivate MagickBooleanType QueryMagickColorCompliance(const char *name, % % % % % % -% Q u e r y M a g i c k C o l o r % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% QueryMagickColor() returns the red, green, blue, and opacity intensities -% for a given color name. -% -% The format of the QueryMagickColor method is: -% -% MagickBooleanType QueryMagickColor(const char *name, -% PixelInfo *color,ExceptionInfo *exception) -% -% A description of each parameter follows: -% -% o name: the color name (e.g. white, blue, yellow). -% -% o color: the red, green, blue, and opacity intensities values of the -% named color in this structure. -% -% o exception: return any errors or warnings in this structure. -% -*/ -MagickExport MagickBooleanType QueryMagickColor(const char *name, - PixelInfo *color,ExceptionInfo *exception) -{ - return(QueryMagickColorCompliance(name,AllCompliance,color,exception)); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % Q u e r y M a g i c k C o l o r n a m e % % % % % diff --git a/MagickCore/color.h b/MagickCore/color.h index 7735689a1..998deb03f 100644 --- a/MagickCore/color.h +++ b/MagickCore/color.h @@ -77,10 +77,10 @@ extern MagickExport MagickBooleanType ListColorInfo(FILE *,ExceptionInfo *), QueryColorCompliance(const char *,const ComplianceType,PixelPacket *, ExceptionInfo *), - QueryColorDatabase(const char *,PixelPacket *,ExceptionInfo *), QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *, ExceptionInfo *), - QueryMagickColor(const char *,PixelInfo *,ExceptionInfo *), + QueryMagickColorCompliance(const char *,const ComplianceType,PixelInfo *, + ExceptionInfo *), QueryMagickColorname(const Image *,const PixelInfo *,const ComplianceType, char *,ExceptionInfo *); diff --git a/MagickCore/compare.c b/MagickCore/compare.c index d2ee64264..10f56cbbf 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -161,14 +161,18 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image, return((Image *) NULL); } (void) SetImageAlphaChannel(highlight_image,OpaqueAlphaChannel,exception); - (void) QueryMagickColor("#f1001ecc",&highlight,exception); + (void) QueryMagickColorCompliance("#f1001ecc",AllCompliance,&highlight, + exception); artifact=GetImageArtifact(image,"highlight-color"); if (artifact != (const char *) NULL) - (void) QueryMagickColor(artifact,&highlight,exception); - (void) QueryMagickColor("#ffffffcc",&lowlight,exception); + (void) QueryMagickColorCompliance(artifact,AllCompliance,&highlight, + exception); + (void) QueryMagickColorCompliance("#ffffffcc",AllCompliance,&lowlight, + exception); artifact=GetImageArtifact(image,"lowlight-color"); if (artifact != (const char *) NULL) - (void) QueryMagickColor(artifact,&lowlight,exception); + (void) QueryMagickColorCompliance(artifact,AllCompliance,&lowlight, + exception); if (highlight_image->colorspace == CMYKColorspace) { ConvertRGBToCMYK(&highlight); diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index cccf853e9..baabf5ab7 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -196,7 +196,7 @@ MagickExport Image *ConstituteImage(const size_t columns, assert(pixels != (void *) NULL); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage((ImageInfo *) NULL); + image=AcquireImage((ImageInfo *) NULL,exception); if (image == (Image *) NULL) return((Image *) NULL); if ((columns == 0) || (rows == 0)) @@ -483,7 +483,7 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, MagickBooleanType status; - image=AcquireImage(read_info); + image=AcquireImage(read_info,exception); (void) CopyMagickString(image->filename,read_info->filename, MaxTextExtent); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -541,7 +541,7 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, /* Let our decoding delegate process the image. */ - image=AcquireImage(read_info); + image=AcquireImage(read_info,exception); if (image == (Image *) NULL) { read_info=DestroyImageInfo(read_info); diff --git a/MagickCore/display.c b/MagickCore/display.c index ac6a95313..89fab2ced 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -3827,8 +3827,8 @@ static MagickBooleanType XColorEditImage(Display *display, } draw_info=CloneDrawInfo(resource_info->image_info, (DrawInfo *) NULL); - (void) QueryColorDatabase(resource_info->pen_colors[pen_id], - &draw_info->fill,exception); + (void) QueryColorCompliance(resource_info->pen_colors[pen_id], + AllCompliance,&draw_info->fill,exception); (void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t) x_offset,(ssize_t) y_offset,method == FloodfillMethod ? MagickFalse : MagickTrue,exception); @@ -6599,7 +6599,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info, /* Save image before transformations are applied. */ - cache_image=AcquireImage((ImageInfo *) NULL); + cache_image=AcquireImage((ImageInfo *) NULL,exception); if (cache_image == (Image *) NULL) break; XSetCursorState(display,windows,MagickTrue); @@ -7640,8 +7640,8 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info, exception); XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); - (void) QueryColorDatabase(color,&(*image)->background_color, - exception); + (void) QueryColorCompliance(color,AllCompliance, + &(*image)->background_color,exception); flags=ParseGeometry(geometry,&geometry_info); if ((flags & SigmaValue) == 0) geometry_info.sigma=geometry_info.rho; @@ -8869,7 +8869,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info, exception); XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); - (void) QueryColorDatabase(color,&(*image)->border_color, + (void) QueryColorCompliance(color,AllCompliance,&(*image)->border_color, exception); (void) ParsePageGeometry(*image,geometry,&page_geometry, exception); @@ -8918,7 +8918,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info, exception); XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); - (void) QueryColorDatabase(color,&(*image)->matte_color, + (void) QueryColorCompliance(color,AllCompliance,&(*image)->matte_color, exception); (void) ParsePageGeometry(*image,geometry,&page_geometry, exception); diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 9ce692696..1ec4a23db 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1273,7 +1273,8 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, coordinates; clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info); - (void) QueryColorDatabase("#0000",&clone_info->fill,&image->exception); + (void) QueryColorCompliance("#0000",AllCompliance,&clone_info->fill, + &image->exception); resolution.x=DefaultResolution; resolution.y=DefaultResolution; if (clone_info->density != (char *) NULL) @@ -1325,10 +1326,10 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, for (i=0; i < (ssize_t) polygon_info->number_edges; i++) { if (polygon_info->edges[i].direction != 0) - (void) QueryColorDatabase("red",&clone_info->stroke, + (void) QueryColorCompliance("red",AllCompliance,&clone_info->stroke, &image->exception); else - (void) QueryColorDatabase("green",&clone_info->stroke, + (void) QueryColorCompliance("green",AllCompliance,&clone_info->stroke, &image->exception); start.x=(double) (polygon_info->edges[i].bounds.x1-mid); start.y=(double) (polygon_info->edges[i].bounds.y1-mid); @@ -1342,7 +1343,8 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, (void) DrawPrimitive(image,clone_info,primitive_info); } } - (void) QueryColorDatabase("blue",&clone_info->stroke,&image->exception); + (void) QueryColorCompliance("blue",AllCompliance,&clone_info->stroke, + &image->exception); start.x=(double) (bounds.x1-mid); start.y=(double) (bounds.y1-mid); end.x=(double) (bounds.x2+mid); @@ -1421,8 +1423,8 @@ MagickExport MagickBooleanType DrawClipPath(Image *image, (void) SetImageClipMask(image,clip_mask,exception); clip_mask=DestroyImage(clip_mask); } - (void) QueryColorDatabase("#00000000",&image->clip_mask->background_color, - &image->exception); + (void) QueryColorCompliance("#00000000",AllCompliance, + &image->clip_mask->background_color,&image->exception); image->clip_mask->background_color.alpha=(Quantum) TransparentAlpha; (void) SetImageBackgroundColor(image->clip_mask); if (image->debug != MagickFalse) @@ -1430,7 +1432,8 @@ MagickExport MagickBooleanType DrawClipPath(Image *image, draw_info->clip_mask); clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info); (void) CloneString(&clone_info->primitive,value); - (void) QueryColorDatabase("#ffffff",&clone_info->fill,&image->exception); + (void) QueryColorCompliance("#ffffff",AllCompliance,&clone_info->fill, + &image->exception); clone_info->clip_mask=(char *) NULL; status=DrawImage(image->clip_mask,clone_info,exception); status|=NegateImage(image->clip_mask,MagickFalse,&image->exception); @@ -1782,7 +1785,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, graphic_context[n]->viewbox.height=image->rows; } token=AcquireString(primitive); - (void) QueryColorDatabase("#000000",&start_color,&image->exception); + (void) QueryColorCompliance("#000000",AllCompliance,&start_color, + &image->exception); if (SetImageStorageClass(image,DirectClass,&image->exception) == MagickFalse) return(MagickFalse); status=MagickTrue; @@ -1859,8 +1863,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (LocaleCompare("border-color",keyword) == 0) { GetMagickToken(q,&q,token); - (void) QueryColorDatabase(token,&graphic_context[n]->border_color, - &image->exception); + (void) QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->border_color,&image->exception); break; } status=MagickFalse; @@ -1985,8 +1989,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, &graphic_context[n]->fill_pattern,exception); else { - status=QueryColorDatabase(token,&graphic_context[n]->fill, - &image->exception); + status=QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->fill,&image->exception); if (status == MagickFalse) { ImageInfo @@ -2498,7 +2502,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, stop_color; GetMagickToken(q,&q,token); - (void) QueryColorDatabase(token,&stop_color,&image->exception); + (void) QueryColorCompliance(token,AllCompliance,&stop_color, + &image->exception); (void) GradientImage(image,LinearGradient,ReflectSpread, &start_color,&stop_color,&image->exception); start_color=stop_color; @@ -2514,8 +2519,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, &graphic_context[n]->stroke_pattern,exception); else { - status=QueryColorDatabase(token,&graphic_context[n]->stroke, - &image->exception); + status=QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->stroke,&image->exception); if (status == MagickFalse) { ImageInfo @@ -2697,8 +2702,8 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, if (LocaleCompare("text-undercolor",keyword) == 0) { GetMagickToken(q,&q,token); - (void) QueryColorDatabase(token,&graphic_context[n]->undercolor, - &image->exception); + (void) QueryColorCompliance(token,AllCompliance, + &graphic_context[n]->undercolor,&image->exception); break; } if (LocaleCompare("translate",keyword) == 0) @@ -3523,10 +3528,10 @@ MagickExport MagickBooleanType DrawPatternPath(Image *image, *pattern=DestroyImage(*pattern); image_info=AcquireImageInfo(); image_info->size=AcquireString(geometry); - *pattern=AcquireImage(image_info); + *pattern=AcquireImage(image_info,&image->exception); image_info=DestroyImageInfo(image_info); - (void) QueryColorDatabase("#00000000",&(*pattern)->background_color, - &image->exception); + (void) QueryColorCompliance("#00000000",AllCompliance, + &(*pattern)->background_color,&image->exception); (void) SetImageBackgroundColor(*pattern); if (image->debug != MagickFalse) (void) LogMagickEvent(DrawEvent,GetMagickModule(), @@ -4758,8 +4763,10 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info) clone_info=CloneImageInfo(image_info); GetAffineMatrix(&draw_info->affine); exception=AcquireExceptionInfo(); - (void) QueryColorDatabase("#000F",&draw_info->fill,exception); - (void) QueryColorDatabase("#FFF0",&draw_info->stroke,exception); + (void) QueryColorCompliance("#000F",AllCompliance,&draw_info->fill, + exception); + (void) QueryColorCompliance("#FFF0",AllCompliance,&draw_info->stroke, + exception); draw_info->stroke_antialias=clone_info->antialias; draw_info->stroke_width=1.0; draw_info->alpha=OpaqueAlpha; @@ -4802,16 +4809,19 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info) MagickDirectionOptions,MagickFalse,option); option=GetImageOption(clone_info,"fill"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&draw_info->fill,exception); + (void) QueryColorCompliance(option,AllCompliance,&draw_info->fill, + exception); option=GetImageOption(clone_info,"stroke"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&draw_info->stroke,exception); + (void) QueryColorCompliance(option,AllCompliance,&draw_info->stroke, + exception); option=GetImageOption(clone_info,"strokewidth"); if (option != (const char *) NULL) draw_info->stroke_width=InterpretLocaleValue(option,(char **) NULL); option=GetImageOption(clone_info,"undercolor"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&draw_info->undercolor,exception); + (void) QueryColorCompliance(option,AllCompliance,&draw_info->undercolor, + exception); option=GetImageOption(clone_info,"gravity"); if (option != (const char *) NULL) draw_info->gravity=(GravityType) ParseCommandOption(MagickGravityOptions, diff --git a/MagickCore/effect.c b/MagickCore/effect.c index e94df223d..deb7d5290 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -2404,7 +2404,8 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview, (void) SetImageProperty(thumbnail,"label",DefaultTileLabel); if (i == (NumberTiles/2)) { - (void) QueryColorDatabase("#dfdfdf",&thumbnail->matte_color,exception); + (void) QueryColorCompliance("#dfdfdf",AllCompliance, + &thumbnail->matte_color,exception); AppendImageToList(&images,thumbnail); continue; } diff --git a/MagickCore/fx.c b/MagickCore/fx.c index cb20c249a..2f3da01dc 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1472,7 +1472,7 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, p+=strlen(name); } else - if (QueryMagickColor(name,&pixel,fx_info->exception) != MagickFalse) + if (QueryMagickColorCompliance(name,AllCompliance,&pixel,fx_info->exception) != MagickFalse) { (void) AddValueToSplayTree(fx_info->colors,ConstantString(name), ClonePixelInfo(&pixel)); @@ -3897,7 +3897,8 @@ MagickExport Image *PolaroidImage(const Image *image,const DrawInfo *draw_info, quantum,(ssize_t) (image->rows+3*quantum/2)); caption_image=DestroyImage(caption_image); } - (void) QueryColorDatabase("none",&picture_image->background_color,exception); + (void) QueryColorCompliance("none",AllCompliance, + &picture_image->background_color,exception); (void) SetImageAlphaChannel(picture_image,OpaqueAlphaChannel,exception); rotate_image=RotateImage(picture_image,90.0,exception); picture_image=DestroyImage(picture_image); @@ -3935,7 +3936,8 @@ MagickExport Image *PolaroidImage(const Image *image,const DrawInfo *draw_info, (void) CompositeImage(polaroid_image,OverCompositeOp,picture_image, (ssize_t) (-0.01*picture_image->columns/2.0),0L); picture_image=DestroyImage(picture_image); - (void) QueryColorDatabase("none",&polaroid_image->background_color,exception); + (void) QueryColorCompliance("none",AllCompliance, + &polaroid_image->background_color,exception); rotate_image=RotateImage(polaroid_image,angle,exception); polaroid_image=DestroyImage(polaroid_image); if (rotate_image == (Image *) NULL) @@ -4162,7 +4164,8 @@ MagickExport Image *ShadowImage(const Image *image,const double opacity, border_info.height=(size_t) floor(2.0*sigma+0.5); border_info.x=0; border_info.y=0; - (void) QueryColorDatabase("none",&clone_image->border_color,exception); + (void) QueryColorCompliance("none",AllCompliance,&clone_image->border_color, + exception); border_image=BorderImage(clone_image,&border_info,image->compose,exception); clone_image=DestroyImage(clone_image); if (border_image == (Image *) NULL) @@ -5261,11 +5264,14 @@ MagickExport Image *VignetteImage(const Image *image,const double radius, canvas_image=DestroyImage(canvas_image); return((Image *) NULL); } - (void) QueryColorDatabase("#000000",&oval_image->background_color,exception); + (void) QueryColorCompliance("#000000",AllCompliance, + &oval_image->background_color,exception); (void) SetImageBackgroundColor(oval_image); draw_info=CloneDrawInfo((const ImageInfo *) NULL,(const DrawInfo *) NULL); - (void) QueryColorDatabase("#ffffff",&draw_info->fill,exception); - (void) QueryColorDatabase("#ffffff",&draw_info->stroke,exception); + (void) QueryColorCompliance("#ffffff",AllCompliance,&draw_info->fill, + exception); + (void) QueryColorCompliance("#ffffff",AllCompliance,&draw_info->stroke, + exception); (void) FormatLocaleString(ellipse,MaxTextExtent, "ellipse %g,%g,%g,%g,0.0,360.0",image->columns/2.0, image->rows/2.0,image->columns/2.0-x,image->rows/2.0-y); diff --git a/MagickCore/image.c b/MagickCore/image.c index 4789c1e18..349dcead1 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -135,7 +135,7 @@ const double % % The format of the AcquireImage method is: % -% Image *AcquireImage(const ImageInfo *image_info) +% Image *AcquireImage(const ImageInfo *image_info,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -143,8 +143,11 @@ const double % structure. For example, filename, compression, depth, background color, % and others. % +% o exception: return any errors or warnings in this structure. +% */ -MagickExport Image *AcquireImage(const ImageInfo *image_info) +MagickExport Image *AcquireImage(const ImageInfo *image_info, + ExceptionInfo *exception) { const char *option; @@ -175,12 +178,14 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info) image->compose=OverCompositeOp; image->blur=1.0; GetExceptionInfo(&image->exception); - (void) QueryColorDatabase(BackgroundColor,&image->background_color, - &image->exception); - (void) QueryColorDatabase(BorderColor,&image->border_color,&image->exception); - (void) QueryColorDatabase(MatteColor,&image->matte_color,&image->exception); - (void) QueryColorDatabase(TransparentColor,&image->transparent_color, - &image->exception); + (void) QueryColorCompliance(BackgroundColor,AllCompliance, + &image->background_color,exception); + (void) QueryColorCompliance(BorderColor,AllCompliance,&image->border_color, + exception); + (void) QueryColorCompliance(MatteColor,AllCompliance,&image->matte_color, + exception); + (void) QueryColorCompliance(TransparentColor,AllCompliance, + &image->transparent_color,exception); image->x_resolution=DefaultResolution; image->y_resolution=DefaultResolution; image->units=PixelsPerInchResolution; @@ -344,7 +349,8 @@ MagickExport ImageInfo *AcquireImageInfo(void) % % The format of the AcquireNextImage method is: % -% void AcquireNextImage(const ImageInfo *image_info,Image *image) +% void AcquireNextImage(const ImageInfo *image_info,Image *image, +% ExceptionInfo *exception) % % A description of each parameter follows: % @@ -354,8 +360,11 @@ MagickExport ImageInfo *AcquireImageInfo(void) % % o image: the image. % +% o exception: return any errors or warnings in this structure. +% */ -MagickExport void AcquireNextImage(const ImageInfo *image_info,Image *image) +MagickExport void AcquireNextImage(const ImageInfo *image_info,Image *image, + ExceptionInfo *exception) { /* Allocate image structure. @@ -364,7 +373,7 @@ MagickExport void AcquireNextImage(const ImageInfo *image_info,Image *image) assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - image->next=AcquireImage(image_info); + image->next=AcquireImage(image_info,exception); if (GetNextImageInList(image) == (Image *) NULL) return; (void) CopyMagickString(GetNextImageInList(image)->filename,image->filename, @@ -1484,12 +1493,14 @@ MagickExport void GetImageInfo(ImageInfo *image_info) if (synchronize != (const char *) NULL) image_info->synchronize=IsMagickTrue(synchronize); exception=AcquireExceptionInfo(); - (void) QueryColorDatabase(BackgroundColor,&image_info->background_color, - exception); - (void) QueryColorDatabase(BorderColor,&image_info->border_color,exception); - (void) QueryColorDatabase(MatteColor,&image_info->matte_color,exception); - (void) QueryColorDatabase(TransparentColor,&image_info->transparent_color, + (void) QueryColorCompliance(BackgroundColor,AllCompliance, + &image_info->background_color,exception); + (void) QueryColorCompliance(BorderColor,AllCompliance, + &image_info->border_color,exception); + (void) QueryColorCompliance(MatteColor,AllCompliance,&image_info->matte_color, exception); + (void) QueryColorCompliance(TransparentColor,AllCompliance, + &image_info->transparent_color,exception); exception=DestroyExceptionInfo(exception); image_info->debug=IsEventLogging(); image_info->signature=MagickSignature; @@ -2086,7 +2097,7 @@ MagickExport Image *NewMagickImage(const ImageInfo *image_info, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(image_info->signature == MagickSignature); assert(background != (const PixelInfo *) NULL); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); image->columns=width; image->rows=height; image->colorspace=background->colorspace; @@ -3172,7 +3183,7 @@ MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info, /* Determine the image format from the first few bytes of the file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); (void) CopyMagickString(image->filename,image_info->filename, MaxTextExtent); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -4178,7 +4189,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); option=GetImageOption(image_info,"background"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&image->background_color, + (void) QueryColorCompliance(option,AllCompliance,&image->background_color, &image->exception); option=GetImageOption(image_info,"bias"); if (option != (const char *) NULL) @@ -4198,7 +4209,8 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, } option=GetImageOption(image_info,"bordercolor"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&image->border_color,&image->exception); + (void) QueryColorCompliance(option,AllCompliance,&image->border_color, + &image->exception); option=GetImageOption(image_info,"colors"); if (option != (const char *) NULL) image->colors=StringToUnsignedLong(option); @@ -4273,7 +4285,8 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, image->iterations=StringToUnsignedLong(option); option=GetImageOption(image_info,"mattecolor"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&image->matte_color,&image->exception); + (void) QueryColorCompliance(option,AllCompliance,&image->matte_color, + &image->exception); option=GetImageOption(image_info,"orient"); if (option != (const char *) NULL) image->orientation=(OrientationType) ParseCommandOption( @@ -4321,7 +4334,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info, } option=GetImageOption(image_info,"transparent-color"); if (option != (const char *) NULL) - (void) QueryColorDatabase(option,&image->transparent_color, + (void) QueryColorCompliance(option,AllCompliance,&image->transparent_color, &image->exception); option=GetImageOption(image_info,"type"); if (option != (const char *) NULL) diff --git a/MagickCore/image.h b/MagickCore/image.h index d95756713..2424ede14 100644 --- a/MagickCore/image.h +++ b/MagickCore/image.h @@ -499,7 +499,7 @@ extern MagickExport FILE *GetImageInfoFile(const ImageInfo *); extern MagickExport Image - *AcquireImage(const ImageInfo *), + *AcquireImage(const ImageInfo *,ExceptionInfo *), *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *), *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType, ExceptionInfo *), @@ -556,7 +556,7 @@ extern MagickExport VirtualPixelMethod SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod); extern MagickExport void - AcquireNextImage(const ImageInfo *,Image *), + AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *), DestroyImagePixels(Image *), DisassociateImageStream(Image *), GetImageException(Image *,ExceptionInfo *), diff --git a/MagickCore/mac.c b/MagickCore/mac.c index 3fa8758b1..0e5ee36d9 100644 --- a/MagickCore/mac.c +++ b/MagickCore/mac.c @@ -1234,7 +1234,7 @@ MagickExport Image *ReadPICTImage(const ImageInfo *image_info, /* Open image file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) return(NULL); diff --git a/MagickCore/magick-config.h b/MagickCore/magick-config.h index df4049a78..6fe106710 100644 --- a/MagickCore/magick-config.h +++ b/MagickCore/magick-config.h @@ -12,7 +12,9 @@ /* #undef AUTOTRACE_DELEGATE */ /* Define if coders and filters are to be built as modules. */ -/* #undef BUILD_MODULES */ +#ifndef MAGICKCORE_BUILD_MODULES +#define MAGICKCORE_BUILD_MODULES 1 +#endif /* Define if you have the bzip2 library */ #ifndef MAGICKCORE_BZLIB_DELEGATE @@ -75,7 +77,9 @@ #endif /* Define if you have FFTW library */ -/* #undef FFTW_DELEGATE */ +#ifndef MAGICKCORE_FFTW_DELEGATE +#define MAGICKCORE_FFTW_DELEGATE 1 +#endif /* Location of filter modules */ #ifndef MAGICKCORE_FILTER_PATH @@ -217,7 +221,9 @@ #endif /* Define to 1 if you have the header file. */ -/* #undef HAVE_CL_CL_H */ +#ifndef MAGICKCORE_HAVE_CL_CL_H +#define MAGICKCORE_HAVE_CL_CL_H 1 +#endif /* Define to 1 if you have the header file. */ #ifndef MAGICKCORE_HAVE_COMPLEX_H @@ -429,15 +435,15 @@ #endif /* Define if you have the header file. */ -#ifndef MAGICKCORE_HAVE_LCMS2_H -#define MAGICKCORE_HAVE_LCMS2_H 1 -#endif +/* #undef HAVE_LCMS2_H */ /* Define if you have the header file. */ /* #undef HAVE_LCMS2_LCMS2_H */ /* Define if you have the header file. */ -/* #undef HAVE_LCMS_H */ +#ifndef MAGICKCORE_HAVE_LCMS_H +#define MAGICKCORE_HAVE_LCMS_H 1 +#endif /* Define if you have the header file. */ /* #undef HAVE_LCMS_LCMS_H */ @@ -1160,7 +1166,9 @@ #endif /* Define if you have JBIG library */ -/* #undef JBIG_DELEGATE */ +#ifndef MAGICKCORE_JBIG_DELEGATE +#define MAGICKCORE_JBIG_DELEGATE 1 +#endif /* Define if you have JPEG version 2 "Jasper" library */ #ifndef MAGICKCORE_JP2_DELEGATE @@ -1189,7 +1197,9 @@ #endif /* Define if you have LQR library */ -/* #undef LQR_DELEGATE */ +#ifndef MAGICKCORE_LQR_DELEGATE +#define MAGICKCORE_LQR_DELEGATE 1 +#endif /* Define if using libltdl to support dynamically loadable modules */ #ifndef MAGICKCORE_LTDL_DELEGATE @@ -1201,7 +1211,7 @@ /* Define to the system default library search path. */ #ifndef MAGICKCORE_LT_DLSEARCH_PATH -#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2" +#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2" #endif /* The archive extension */ @@ -1252,7 +1262,9 @@ /* #undef NO_MINUS_C_MINUS_O */ /* Define if you have OPENEXR library */ -/* #undef OPENEXR_DELEGATE */ +#ifndef MAGICKCORE_OPENEXR_DELEGATE +#define MAGICKCORE_OPENEXR_DELEGATE 1 +#endif /* Define to the address where bug reports for this package should be sent. */ #ifndef MAGICKCORE_PACKAGE_BUGREPORT @@ -1307,7 +1319,9 @@ #endif /* Define if you have RSVG library */ -/* #undef RSVG_DELEGATE */ +#ifndef MAGICKCORE_RSVG_DELEGATE +#define MAGICKCORE_RSVG_DELEGATE 1 +#endif /* Define to the type of arg 1 for `select'. */ #ifndef MAGICKCORE_SELECT_TYPE_ARG1 @@ -1444,7 +1458,9 @@ /* Define if you have WEBP library */ -/* #undef WEBP_DELEGATE */ +#ifndef MAGICKCORE_WEBP_DELEGATE +#define MAGICKCORE_WEBP_DELEGATE 1 +#endif /* Define to use the Windows GDI32 library */ /* #undef WINGDI32_DELEGATE */ @@ -1453,7 +1469,9 @@ /* #undef WITH_DMALLOC */ /* Define if you have WMF library */ -/* #undef WMF_DELEGATE */ +#ifndef MAGICKCORE_WMF_DELEGATE +#define MAGICKCORE_WMF_DELEGATE 1 +#endif /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -1509,7 +1527,9 @@ /* #undef _MINIX */ /* Define this for the OpenCL Accelerator */ -/* #undef _OPENCL */ +#ifndef MAGICKCORE__OPENCL +#define MAGICKCORE__OPENCL 1 +#endif /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ diff --git a/MagickCore/montage.c b/MagickCore/montage.c index 95bba690c..fa62b433c 100644 --- a/MagickCore/montage.c +++ b/MagickCore/montage.c @@ -577,8 +577,8 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, /* Allocate next structure. */ - tile_image=AcquireImage(NULL); - montage=AcquireImage(clone_info); + tile_image=AcquireImage((ImageInfo *) NULL,exception); + montage=AcquireImage(clone_info,exception); montage->background_color=montage_info->background_color; montage->scene=0; images_per_page=(number_images-1)/(tiles_per_row*tiles_per_column)+1; @@ -817,8 +817,8 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, /* Shadow image. */ - (void) QueryColorDatabase("#00000000",&image->background_color, - exception); + (void) QueryColorCompliance("#00000000",AllCompliance, + &image->background_color,exception); shadow_image=ShadowImage(image,80.0,2.0,5,5,exception); if (shadow_image != (Image *) NULL) { @@ -881,7 +881,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(clone_info,montage); + AcquireNextImage(clone_info,montage,exception); if (GetNextImageInList(montage) == (Image *) NULL) { montage=DestroyImageList(montage); diff --git a/MagickCore/property.c b/MagickCore/property.c index c2b82d3c1..6dab5b2c8 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -3288,7 +3288,8 @@ MagickExport MagickBooleanType SetImageProperty(Image *image, { if (LocaleCompare(property,"background") == 0) { - (void) QueryColorDatabase(value,&image->background_color,exception); + (void) QueryColorCompliance(value,AllCompliance, + &image->background_color,exception); break; } if (LocaleCompare(property,"bias") == 0) diff --git a/MagickCore/stream.c b/MagickCore/stream.c index 2e75164ff..bc0c380fd 100644 --- a/MagickCore/stream.c +++ b/MagickCore/stream.c @@ -141,14 +141,18 @@ static Quantum % % The format of the AcquireStreamInfo method is: % -% StreamInfo *AcquireStreamInfo(const ImageInfo *image_info) +% StreamInfo *AcquireStreamInfo(const ImageInfo *image_info, +% ExceptionInfo *exception) % % A description of each parameter follows: % % o image_info: the image info. % +% o exception: return any errors or warnings in this structure. +% */ -MagickExport StreamInfo *AcquireStreamInfo(const ImageInfo *image_info) +MagickExport StreamInfo *AcquireStreamInfo(const ImageInfo *image_info, + ExceptionInfo *exception) { StreamInfo *stream_info; @@ -163,7 +167,7 @@ MagickExport StreamInfo *AcquireStreamInfo(const ImageInfo *image_info) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); stream_info->map=ConstantString("RGB"); stream_info->storage_type=CharPixel; - stream_info->stream=AcquireImage(image_info); + stream_info->stream=AcquireImage(image_info,exception); stream_info->signature=MagickSignature; return(stream_info); } diff --git a/MagickCore/stream.h b/MagickCore/stream.h index 1422f4226..943cded5b 100644 --- a/MagickCore/stream.h +++ b/MagickCore/stream.h @@ -37,7 +37,7 @@ extern MagickExport MagickBooleanType WriteStream(const ImageInfo *,Image *,StreamHandler); extern MagickExport StreamInfo - *AcquireStreamInfo(const ImageInfo *), + *AcquireStreamInfo(const ImageInfo *,ExceptionInfo *), *DestroyStreamInfo(StreamInfo *); extern MagickExport void diff --git a/MagickCore/version.h b/MagickCore/version.h index eda5162aa..915ea3c5c 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -27,14 +27,14 @@ extern "C" { */ #define MagickPackageName "ImageMagick" #define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC" -#define MagickSVNRevision "5446" +#define MagickSVNRevision "exported" #define MagickLibVersion 0x700 #define MagickLibVersionText "7.0.0" #define MagickLibVersionNumber 7,0,0 #define MagickLibAddendum "-0" #define MagickLibInterface 7 #define MagickLibMinInterface 7 -#define MagickReleaseDate "2011-09-28" +#define MagickReleaseDate "2011-10-01" #define MagickChangeDate "20110801" #define MagickAuthoritativeURL "http://www.imagemagick.org" #if defined(MAGICKCORE_OPENMP_SUPPORT) diff --git a/MagickCore/xwindow-private.h b/MagickCore/xwindow-private.h index 71b911a0a..a37978a3d 100644 --- a/MagickCore/xwindow-private.h +++ b/MagickCore/xwindow-private.h @@ -520,7 +520,7 @@ extern MagickPrivate MagickBooleanType const MagickSizeType,void *), XMakeImage(Display *,const XResourceInfo *,XWindowInfo *,Image *,unsigned int, unsigned int,ExceptionInfo *), - XQueryColorDatabase(const char *,XColor *); + XQueryColorCompliance(const char *,XColor *); extern MagickPrivate void XBestIconSize(Display *,XWindowInfo *,Image *), diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index 33a3e48d4..b9c75b117 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -540,7 +540,7 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display, /* Initialize annotated image. */ - annotate_image=AcquireImage((ImageInfo *) NULL); + annotate_image=AcquireImage((ImageInfo *) NULL,&image->exception); if (annotate_image == (Image *) NULL) return(MagickFalse); annotate_image->columns=annotate_info->width; @@ -2453,7 +2453,7 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display, /* Initialize draw image. */ - draw_image=AcquireImage((ImageInfo *) NULL); + draw_image=AcquireImage((ImageInfo *) NULL,&image->exception); if (draw_image == (Image *) NULL) return(MagickFalse); draw_image->columns=draw_info->width; @@ -4328,7 +4328,7 @@ static Image *XGetWindowImage(Display *display,const Window window, /* Allocate image structure. */ - composite_image=AcquireImage((ImageInfo *) NULL); + composite_image=AcquireImage((ImageInfo *) NULL,&image->exception); if (composite_image == (Image *) NULL) { XDestroyImage(ximage); @@ -7769,7 +7769,7 @@ MagickPrivate void XMakeStandardColormap(Display *display, /* Improve image appearance with error diffusion. */ - affinity_image=AcquireImage((ImageInfo *) NULL); + affinity_image=AcquireImage((ImageInfo *) NULL,&image->exception); if (affinity_image == (Image *) NULL) ThrowXWindowFatalException(ResourceLimitFatalError, "UnableToDitherImage",image->filename); @@ -8630,12 +8630,12 @@ MagickPrivate MagickBooleanType XMagickProgressMonitor(const char *tag, % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% XQueryColorDatabase() looks up a RGB values for a color given in the target +% XQueryColorCompliance() looks up a RGB values for a color given in the target % string. % % The format of the XQueryColorDatabase method is: % -% MagickBooleanType XQueryColorDatabase(const char *target,XColor *color) +% MagickBooleanType XQueryColorCompliance(const char *target,XColor *color) % % A description of each parameter follows: % @@ -8645,7 +8645,7 @@ MagickPrivate MagickBooleanType XMagickProgressMonitor(const char *tag, % color is returned as this value. % */ -MagickPrivate MagickBooleanType XQueryColorDatabase(const char *target, +MagickPrivate MagickBooleanType XQueryColorCompliance(const char *target, XColor *color) { Colormap diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index 7233f90ff..550500aa7 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -517,7 +517,7 @@ WandExport void ClearDrawingWand(DrawingWand *wand) wand->indent_depth=0; wand->path_operation=PathDefaultOperation; wand->path_mode=DefaultPathMode; - wand->image=AcquireImage((const ImageInfo *) NULL); + wand->image=AcquireImage((const ImageInfo *) NULL,wand->exception); ClearMagickException(wand->exception); wand->destroy=MagickTrue; wand->debug=IsEventLogging(); @@ -6181,7 +6181,8 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, { value=GetXMLTreeContent(child); if (value != (const char *) NULL) - (void) QueryColorDatabase(value,&CurrentContext->fill,wand->exception); + (void) QueryColorCompliance(value,AllCompliance,&CurrentContext->fill, + wand->exception); } child=GetXMLTreeChild(xml_info,"fill-opacity"); if (child != (XMLTreeInfo *) NULL) @@ -6248,7 +6249,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, { value=GetXMLTreeContent(child); if (value != (const char *) NULL) - (void) QueryColorDatabase(value,&CurrentContext->stroke, + (void) QueryColorCompliance(value,AllCompliance,&CurrentContext->stroke, wand->exception); } child=GetXMLTreeChild(xml_info,"stroke-antialias"); @@ -6383,8 +6384,8 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand, { value=GetXMLTreeContent(child); if (value != (const char *) NULL) - (void) QueryColorDatabase(value,&CurrentContext->undercolor, - wand->exception); + (void) QueryColorCompliance(value,AllCompliance, + &CurrentContext->undercolor,wand->exception); } child=GetXMLTreeChild(xml_info,"vector-graphics"); if (child != (XMLTreeInfo *) NULL) @@ -6645,8 +6646,8 @@ WandExport DrawingWand *NewDrawingWand(void) wand->indent_depth=0; wand->path_operation=PathDefaultOperation; wand->path_mode=DefaultPathMode; - wand->image=AcquireImage((const ImageInfo *) NULL); wand->exception=AcquireExceptionInfo(); + wand->image=AcquireImage((const ImageInfo *) NULL,wand->exception); wand->destroy=MagickTrue; wand->debug=IsEventLogging(); wand->signature=WandSignature; diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index 0b65e0801..e23d793c6 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -534,7 +534,7 @@ static Image *SparseColorOption(const Image *image, if ( token[0] == '\0' ) break; if ( isalpha((int) token[0]) || token[0] == '#' ) { /* Color string given */ - (void) QueryMagickColor(token,&color,exception); + (void) QueryMagickColorCompliance(token,AllCompliance,&color,exception); if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) sparse_arguments[x++] = QuantumScale*color.red; if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) @@ -935,18 +935,18 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, { if (*option == '+') { - (void) QueryColorDatabase(MogrifyBorderColor, + (void) QueryColorCompliance(MogrifyBorderColor,AllCompliance, &draw_info->border_color,exception); break; } - (void) QueryColorDatabase(argv[i+1],&draw_info->border_color, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->border_color,exception); break; } if (LocaleCompare("box",option+1) == 0) { - (void) QueryColorDatabase(argv[i+1],&draw_info->undercolor, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->undercolor,exception); break; } if (LocaleCompare("brightness-contrast",option+1) == 0) @@ -1552,15 +1552,19 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, GetPixelInfo(*image,&fill); if (*option == '+') { - (void) QueryMagickColor("none",&fill,exception); - (void) QueryColorDatabase("none",&draw_info->fill,exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&fill, + exception); + (void) QueryColorCompliance("none",AllCompliance, + &draw_info->fill,exception); if (draw_info->fill_pattern != (Image *) NULL) draw_info->fill_pattern=DestroyImage(draw_info->fill_pattern); break; } sans=AcquireExceptionInfo(); - (void) QueryMagickColor(argv[i+1],&fill,sans); - status=QueryColorDatabase(argv[i+1],&draw_info->fill,sans); + (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&fill, + sans); + status=QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->fill,sans); sans=DestroyExceptionInfo(sans); if (status == MagickFalse) draw_info->fill_pattern=GetImageCache(mogrify_info,argv[i+1], @@ -1586,7 +1590,8 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, */ (void) SyncImageSettings(mogrify_info,*image); (void) ParsePageGeometry(*image,argv[i+1],&geometry,exception); - (void) QueryMagickColor(argv[i+2],&target,exception); + (void) QueryMagickColorCompliance(argv[i+2],AllCompliance,&target, + exception); (void) FloodfillPaintImage(*image,draw_info,&target,geometry.x, geometry.y,*option == '-' ? MagickFalse : MagickTrue,exception); break; @@ -1916,9 +1921,11 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, p=(const char *) argv[i+1]; GetMagickToken(p,&p,token); /* get black point color */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColor(token,&black_point,exception); + (void) QueryMagickColorCompliance(token,AllCompliance, + &black_point,exception); else - (void) QueryMagickColor("#000000",&black_point,exception); + (void) QueryMagickColorCompliance("#000000",AllCompliance, + &black_point,exception); if (isalpha((int) token[0]) || (token[0] == '#')) GetMagickToken(p,&p,token); if (*token == '\0') @@ -1928,9 +1935,11 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, if ((isalpha((int) *token) == 0) && ((*token == '#') == 0)) GetMagickToken(p,&p,token); /* Get white point color. */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColor(token,&white_point,exception); + (void) QueryMagickColorCompliance(token,AllCompliance, + &white_point,exception); else - (void) QueryMagickColor("#ffffff",&white_point,exception); + (void) QueryMagickColorCompliance("#ffffff",AllCompliance, + &white_point,exception); } (void) LevelImageColors(*image,&black_point,&white_point, *option == '+' ? MagickTrue : MagickFalse,exception); @@ -2198,7 +2207,8 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, target; (void) SyncImageSettings(mogrify_info,*image); - (void) QueryMagickColor(argv[i+1],&target,exception); + (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&target, + exception); (void) OpaquePaintImage(*image,&target,&fill,*option == '-' ? MagickFalse : MagickTrue,exception); break; @@ -2225,10 +2235,12 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, { if (*option == '+') { - (void) QueryColorDatabase("none",&draw_info->fill,exception); + (void) QueryColorCompliance("none",AllCompliance, + &draw_info->fill,exception); break; } - (void) QueryColorDatabase(argv[i+1],&draw_info->fill,exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->fill,exception); break; } if (LocaleCompare("pointsize",option+1) == 0) @@ -2858,14 +2870,16 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, if (*option == '+') { - (void) QueryColorDatabase("none",&draw_info->stroke,exception); + (void) QueryColorCompliance("none",AllCompliance, + &draw_info->stroke,exception); if (draw_info->stroke_pattern != (Image *) NULL) draw_info->stroke_pattern=DestroyImage( draw_info->stroke_pattern); break; } sans=AcquireExceptionInfo(); - status=QueryColorDatabase(argv[i+1],&draw_info->stroke,sans); + status=QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->stroke,sans); sans=DestroyExceptionInfo(sans); if (status == MagickFalse) draw_info->stroke_pattern=GetImageCache(mogrify_info,argv[i+1], @@ -2969,7 +2983,8 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, target; (void) SyncImageSettings(mogrify_info,*image); - (void) QueryMagickColor(argv[i+1],&target,exception); + (void) QueryMagickColorCompliance(argv[i+1],AllCompliance,&target, + exception); (void) TransparentPaintImage(*image,&target,(Quantum) TransparentAlpha,*option == '-' ? MagickFalse : MagickTrue, &(*image)->exception); @@ -3028,8 +3043,8 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, { if (LocaleCompare("undercolor",option+1) == 0) { - (void) QueryColorDatabase(argv[i+1],&draw_info->undercolor, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &draw_info->undercolor,exception); break; } if (LocaleCompare("unique",option+1) == 0) @@ -6172,13 +6187,13 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, if (*option == '+') { (void) DeleteImageOption(image_info,option+1); - (void) QueryColorDatabase(MogrifyBackgroundColor, - &image_info->background_color,exception); + (void) QueryColorCompliance(MogrifyBackgroundColor, + AllCompliance,&image_info->background_color,exception); break; } (void) SetImageOption(image_info,option+1,argv[i+1]); - (void) QueryColorDatabase(argv[i+1],&image_info->background_color, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &image_info->background_color,exception); break; } if (LocaleCompare("bias",option+1) == 0) @@ -6216,12 +6231,12 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, if (*option == '+') { (void) DeleteImageOption(image_info,option+1); - (void) QueryColorDatabase(MogrifyBorderColor, + (void) QueryColorCompliance(MogrifyBorderColor,AllCompliance, &image_info->border_color,exception); break; } - (void) QueryColorDatabase(argv[i+1],&image_info->border_color, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &image_info->border_color,exception); (void) SetImageOption(image_info,option+1,argv[i+1]); break; } @@ -6787,13 +6802,13 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, if (*option == '+') { (void) SetImageOption(image_info,option+1,argv[i+1]); - (void) QueryColorDatabase(MogrifyMatteColor, + (void) QueryColorCompliance(MogrifyMatteColor,AllCompliance, &image_info->matte_color,exception); break; } (void) SetImageOption(image_info,option+1,argv[i+1]); - (void) QueryColorDatabase(argv[i+1],&image_info->matte_color, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &image_info->matte_color,exception); break; } if (LocaleCompare("monitor",option+1) == 0) @@ -7089,12 +7104,13 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, { if (*option == '+') { - (void) QueryColorDatabase("none",&image_info->transparent_color, exception); + (void) QueryColorCompliance("none",AllCompliance, + &image_info->transparent_color,exception); (void) SetImageOption(image_info,option+1,"none"); break; } - (void) QueryColorDatabase(argv[i+1],&image_info->transparent_color, - exception); + (void) QueryColorCompliance(argv[i+1],AllCompliance, + &image_info->transparent_color,exception); (void) SetImageOption(image_info,option+1,argv[i+1]); break; } diff --git a/MagickWand/montage.c b/MagickWand/montage.c index f9efed0ef..5ea266a3b 100644 --- a/MagickWand/montage.c +++ b/MagickWand/montage.c @@ -510,7 +510,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); - (void) QueryColorDatabase(argv[i], + (void) QueryColorCompliance(argv[i],AllCompliance, &montage_info->background_color,exception); break; } @@ -561,8 +561,8 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); - (void) QueryColorDatabase(argv[i],&montage_info->border_color, - exception); + (void) QueryColorCompliance(argv[i],AllCompliance, + &montage_info->border_color,exception); break; } if (LocaleCompare("borderwidth",option+1) == 0) @@ -911,14 +911,15 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, { if (LocaleCompare("fill",option+1) == 0) { - (void) QueryColorDatabase("none",&montage_info->fill,exception); + (void) QueryColorCompliance("none",AllCompliance, + &montage_info->fill,exception); if (*option == '+') break; i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); - (void) QueryColorDatabase(argv[i],&montage_info->fill, - exception); + (void) QueryColorCompliance(argv[i],AllCompliance, + &montage_info->fill,exception); break; } if (LocaleCompare("filter",option+1) == 0) @@ -1183,8 +1184,8 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); - (void) QueryColorDatabase(argv[i],&montage_info->matte_color, - exception); + (void) QueryColorCompliance(argv[i],AllCompliance, + &montage_info->matte_color,exception); break; } if (LocaleCompare("mode",option+1) == 0) @@ -1486,14 +1487,15 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, } if (LocaleCompare("stroke",option+1) == 0) { - (void) QueryColorDatabase("none",&montage_info->stroke,exception); + (void) QueryColorCompliance("none",AllCompliance, + &montage_info->stroke,exception); if (*option == '+') break; i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); - (void) QueryColorDatabase(argv[i],&montage_info->stroke, - exception); + (void) QueryColorCompliance(argv[i],AllCompliance, + &montage_info->stroke,exception); break; } if (LocaleCompare("strip",option+1) == 0) diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 078a0b49b..89cb720ac 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -291,7 +291,7 @@ static Image *SparseColorOption(const Image *image, if ( token[0] == '\0' ) break; if ( isalpha((int) token[0]) || token[0] == '#' ) { /* Color string given */ - (void) QueryMagickColor(token,&color,exception); + (void) QueryMagickColorCompliance(token,&color,exception); if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) sparse_arguments[x++] = QuantumScale*color.red; if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) @@ -461,12 +461,12 @@ WandExport MagickBooleanType SettingsOptionInfo(ImageInfo *image_info, if (*argv[0] == '+') { (void) DeleteImageOption(image_info,argv[0]+1); - (void) QueryColorDatabase(BackgroundColor, + (void) QueryColorCompliance(BackgroundColor, &image_info->background_color,exception); break; } (void) SetImageOption(image_info,argv[0]+1,argv[1]); - (void) QueryColorDatabase(argv[1],&image_info->background_color, + (void) QueryColorCompliance(argv[1],&image_info->background_color, exception); break; } @@ -505,11 +505,11 @@ WandExport MagickBooleanType SettingsOptionInfo(ImageInfo *image_info, if (*argv[0] == '+') { (void) DeleteImageOption(image_info,argv[0]+1); - (void) QueryColorDatabase(BorderColor,&image_info->border_color, + (void) QueryColorCompliance(BorderColor,&image_info->border_color, exception); break; } - (void) QueryColorDatabase(argv[1],&image_info->border_color, + (void) QueryColorCompliance(argv[1],&image_info->border_color, exception); (void) SetImageOption(image_info,argv[0]+1,argv[1]); break; @@ -1076,12 +1076,12 @@ WandExport MagickBooleanType SettingsOptionInfo(ImageInfo *image_info, if (*argv[0] == '+') { (void) SetImageOption(image_info,argv[0]+1,argv[1]); - (void) QueryColorDatabase(MatteColor,&image_info->matte_color, + (void) QueryColorCompliance(MatteColor,&image_info->matte_color, exception); break; } (void) SetImageOption(image_info,argv[0]+1,argv[1]); - (void) QueryColorDatabase(argv[1],&image_info->matte_color, + (void) QueryColorCompliance(argv[1],&image_info->matte_color, exception); break; } @@ -1378,11 +1378,11 @@ WandExport MagickBooleanType SettingsOptionInfo(ImageInfo *image_info, { if (*argv[0] == '+') { - (void) QueryColorDatabase("none",&image_info->transparent_color, exception); + (void) QueryColorCompliance("none",&image_info->transparent_color, exception); (void) SetImageOption(image_info,argv[0]+1,"none"); break; } - (void) QueryColorDatabase(argv[1],&image_info->transparent_color, + (void) QueryColorCompliance(argv[1],&image_info->transparent_color, exception); (void) SetImageOption(image_info,argv[0]+1,argv[1]); break; @@ -1818,17 +1818,17 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, { if (*argv[0] == '+') { - (void) QueryColorDatabase(BorderColor,&draw_info->border_color, + (void) QueryColorCompliance(BorderColor,&draw_info->border_color, exception); break; } - (void) QueryColorDatabase(argv[1],&draw_info->border_color, + (void) QueryColorCompliance(argv[1],&draw_info->border_color, exception); break; } if (LocaleCompare("box",argv[0]+1) == 0) { - (void) QueryColorDatabase(argv[1],&draw_info->undercolor, + (void) QueryColorCompliance(argv[1],&draw_info->undercolor, exception); break; } @@ -2425,15 +2425,15 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, GetPixelInfo(*image,&fill); if (*argv[0] == '+') { - (void) QueryMagickColor("none",&fill,exception); - (void) QueryColorDatabase("none",&draw_info->fill,exception); + (void) QueryMagickColorCompliance("none",&fill,exception); + (void) QueryColorCompliance("none",&draw_info->fill,exception); if (draw_info->fill_pattern != (Image *) NULL) draw_info->fill_pattern=DestroyImage(draw_info->fill_pattern); break; } sans=AcquireExceptionInfo(); - (void) QueryMagickColor(argv[1],&fill,sans); - status=QueryColorDatabase(argv[1],&draw_info->fill,sans); + (void) QueryMagickColorCompliance(argv[1],&fill,sans); + status=QueryColorCompliance(argv[1],&draw_info->fill,sans); sans=DestroyExceptionInfo(sans); if (status == MagickFalse) draw_info->fill_pattern=GetImageCache(image_info,argv[1], @@ -2468,7 +2468,7 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, */ (void) SyncImageSettings(image_info,*image); (void) ParsePageGeometry(*image,argv[1],&geometry,exception); - (void) QueryMagickColor(argv[2],&target,exception); + (void) QueryMagickColorCompliance(argv[2],&target,exception); (void) FloodfillPaintImage(*image,draw_info,&target,geometry.x, geometry.y,*argv[0] == '-' ? MagickFalse : MagickTrue,exception); break; @@ -2782,9 +2782,9 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, p=(const char *) argv[1]; GetMagickToken(p,&p,token); /* get black point color */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColor(token,&black_point,exception); + (void) QueryMagickColorCompliance(token,&black_point,exception); else - (void) QueryMagickColor("#000000",&black_point,exception); + (void) QueryMagickColorCompliance("#000000",&black_point,exception); if (isalpha((int) token[0]) || (token[0] == '#')) GetMagickToken(p,&p,token); if (*token == '\0') @@ -2794,9 +2794,9 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, if ((isalpha((int) *token) == 0) && ((*token == '#') == 0)) GetMagickToken(p,&p,token); /* Get white point color. */ if ((isalpha((int) *token) != 0) || ((*token == '#') != 0)) - (void) QueryMagickColor(token,&white_point,exception); + (void) QueryMagickColorCompliance(token,&white_point,exception); else - (void) QueryMagickColor("#ffffff",&white_point,exception); + (void) QueryMagickColorCompliance("#ffffff",&white_point,exception); } (void) LevelImageColors(*image,&black_point,&white_point, *argv[0] == '+' ? MagickTrue : MagickFalse,exception); @@ -3064,7 +3064,7 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, target; (void) SyncImageSettings(image_info,*image); - (void) QueryMagickColor(argv[1],&target,exception); + (void) QueryMagickColorCompliance(argv[1],&target,exception); (void) OpaquePaintImage(*image,&target,&fill,*argv[0] == '-' ? MagickFalse : MagickTrue,exception); break; @@ -3091,10 +3091,10 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, { if (*argv[0] == '+') { - (void) QueryColorDatabase("none",&draw_info->fill,exception); + (void) QueryColorCompliance("none",&draw_info->fill,exception); break; } - (void) QueryColorDatabase(argv[1],&draw_info->fill,exception); + (void) QueryColorCompliance(argv[1],&draw_info->fill,exception); break; } if (LocaleCompare("pointsize",argv[0]+1) == 0) @@ -3694,14 +3694,14 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, if (*argv[0] == '+') { - (void) QueryColorDatabase("none",&draw_info->stroke,exception); + (void) QueryColorCompliance("none",&draw_info->stroke,exception); if (draw_info->stroke_pattern != (Image *) NULL) draw_info->stroke_pattern=DestroyImage( draw_info->stroke_pattern); break; } sans=AcquireExceptionInfo(); - status=QueryColorDatabase(argv[1],&draw_info->stroke,sans); + status=QueryColorCompliance(argv[1],&draw_info->stroke,sans); sans=DestroyExceptionInfo(sans); if (status == MagickFalse) draw_info->stroke_pattern=GetImageCache(image_info,argv[1], @@ -3805,7 +3805,7 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, target; (void) SyncImageSettings(image_info,*image); - (void) QueryMagickColor(argv[1],&target,exception); + (void) QueryMagickColorCompliance(argv[1],&target,exception); (void) TransparentPaintImage(*image,&target,(Quantum) TransparentAlpha,*argv[0] == '-' ? MagickFalse : MagickTrue, &(*image)->exception); @@ -3864,7 +3864,7 @@ MagickExport MagickBooleanType SimpleOperationImage(ImageInfo *image_info, { if (LocaleCompare("undercolor",argv[0]+1) == 0) { - (void) QueryColorDatabase(argv[1],&draw_info->undercolor, + (void) QueryColorCompliance(argv[1],&draw_info->undercolor, exception); break; } diff --git a/MagickWand/pixel-wand.c b/MagickWand/pixel-wand.c index 2f1140dfa..56d0e7137 100644 --- a/MagickWand/pixel-wand.c +++ b/MagickWand/pixel-wand.c @@ -1760,7 +1760,7 @@ WandExport MagickBooleanType PixelSetColor(PixelWand *wand,const char *color) assert(wand->signature == WandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); - status=QueryMagickColor(color,&pixel,wand->exception); + status=QueryMagickColorCompliance(color,AllCompliance,&pixel,wand->exception); if (status != MagickFalse) wand->pixel=pixel; return(status); diff --git a/MagickWand/stream.c b/MagickWand/stream.c index d68faf8fc..ac14535e3 100644 --- a/MagickWand/stream.c +++ b/MagickWand/stream.c @@ -250,7 +250,7 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info, option=(char *) NULL; pend=MagickFalse; respect_parenthesis=MagickFalse; - stream_info=AcquireStreamInfo(image_info); + stream_info=AcquireStreamInfo(image_info,exception); status=MagickTrue; /* Stream an image. diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index fb29f6fed..13aad0177 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -1164,7 +1164,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, { if (LocaleCompare(attribute,"background") == 0) { - (void) QueryColorDatabase(SvPV(sval,na),&target_color,exception); + (void) QueryColorCompliance(SvPV(sval,na),AllCompliance,&target_color, + exception); if (info) info->image_info->background_color=target_color; for ( ; image; image=image->next) @@ -1192,7 +1193,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, } if (LocaleCompare(attribute,"bordercolor") == 0) { - (void) QueryColorDatabase(SvPV(sval,na),&target_color,exception); + (void) QueryColorCompliance(SvPV(sval,na),AllCompliance,&target_color, + exception); if (info) info->image_info->border_color=target_color; for ( ; image; image=image->next) @@ -1247,7 +1249,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, i%=image->colors; if ((strchr(SvPV(sval,na),',') == 0) || (strchr(SvPV(sval,na),')') != 0)) - QueryColorDatabase(SvPV(sval,na),image->colormap+i,exception); + QueryColorCompliance(SvPV(sval,na),AllCompliance, + image->colormap+i,exception); else { color=image->colormap+i; @@ -1679,7 +1682,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, } if (LocaleCompare(attribute,"mattecolor") == 0) { - (void) QueryColorDatabase(SvPV(sval,na),&target_color,exception); + (void) QueryColorCompliance(SvPV(sval,na),AllCompliance,&target_color, + exception); if (info) info->image_info->matte_color=target_color; for ( ; image; image=image->next) @@ -1814,7 +1818,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, { if ((strchr(SvPV(sval,na),',') == 0) || (strchr(SvPV(sval,na),')') != 0)) - QueryMagickColor(SvPV(sval,na),&pixel,exception); + QueryMagickColorCompliance(SvPV(sval,na),AllCompliance, + &pixel,exception); else { GetPixelInfo(image,&pixel); @@ -2060,7 +2065,8 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image, } if (LocaleCompare(attribute,"transparent-color") == 0) { - (void) QueryColorDatabase(SvPV(sval,na),&target_color,exception); + (void) QueryColorCompliance(SvPV(sval,na),AllCompliance,&target_color, + exception); if (info) info->image_info->transparent_color=target_color; for ( ; image; image=image->next) @@ -3952,8 +3958,8 @@ Flatten(ref) } background_color=image->background_color; if (items == 2) - (void) QueryColorDatabase((char *) SvPV(ST(1),na),&background_color, - exception); + (void) QueryColorCompliance((char *) SvPV(ST(1),na),AllCompliance, + &background_color,exception); else for (i=2; i < items; i+=2) { @@ -3965,8 +3971,8 @@ Flatten(ref) { if (LocaleCompare(attribute,"background") == 0) { - (void) QueryColorDatabase((char *) SvPV(ST(1),na), - &background_color,exception); + (void) QueryColorCompliance((char *) SvPV(ST(1),na), + AllCompliance,&background_color,exception); break; } ThrowPerlException(exception,OptionError,"UnrecognizedAttribute", @@ -7508,8 +7514,8 @@ Mogrify(ref,...) (void) GetOneVirtualPixel(image,0,0,&target,exception); if (attribute_flag[0] != 0) - (void) QueryColorDatabase(argument_list[0].string_reference,&target, - exception); + (void) QueryColorCompliance(argument_list[0].string_reference, + AllCompliance,&target,exception); if (attribute_flag[1] == 0) argument_list[1].string_reference="100%"; image=ColorizeImage(image,argument_list[1].string_reference,target, @@ -7535,14 +7541,14 @@ Mogrify(ref,...) if (attribute_flag[2] != 0) geometry.height=argument_list[2].integer_reference; if (attribute_flag[3] != 0) - QueryColorDatabase(argument_list[3].string_reference, - &image->border_color,exception); + QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&image->border_color,exception); if (attribute_flag[4] != 0) - QueryColorDatabase(argument_list[4].string_reference, - &image->border_color,exception); + QueryColorCompliance(argument_list[4].string_reference, + AllCompliance,&image->border_color,exception); if (attribute_flag[5] != 0) - QueryColorDatabase(argument_list[5].string_reference, - &image->border_color,exception); + QueryColorCompliance(argument_list[5].string_reference, + AllCompliance,&image->border_color,exception); compose=image->compose; if (attribute_flag[6] != 0) compose=(CompositeOperator) argument_list[6].integer_reference; @@ -7683,11 +7689,11 @@ Mogrify(ref,...) if (attribute_flag[4] != 0) frame_info.outer_bevel=argument_list[4].integer_reference; if (attribute_flag[5] != 0) - QueryColorDatabase(argument_list[5].string_reference,&fill_color, - exception); + QueryColorCompliance(argument_list[5].string_reference, + AllCompliance,&fill_color,exception); if (attribute_flag[6] != 0) - QueryColorDatabase(argument_list[6].string_reference,&fill_color, - exception); + QueryColorCompliance(argument_list[6].string_reference, + AllCompliance,&fill_color,exception); frame_info.x=(ssize_t) frame_info.width; frame_info.y=(ssize_t) frame_info.height; frame_info.width=image->columns+2*frame_info.x; @@ -7795,14 +7801,14 @@ Mogrify(ref,...) if (attribute_flag[0] == 0) argument_list[0].real_reference=90.0; if (attribute_flag[1] != 0) - QueryColorDatabase(argument_list[1].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[1].string_reference, + AllCompliance,&image->background_color,exception); if (attribute_flag[2] != 0) - QueryColorDatabase(argument_list[2].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[2].string_reference, + AllCompliance,&image->background_color,exception); if (attribute_flag[3] != 0) - QueryColorDatabase(argument_list[3].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&image->background_color,exception); image=RotateImage(image,argument_list[0].real_reference,exception); break; } @@ -7886,11 +7892,11 @@ Mogrify(ref,...) if (attribute_flag[2] != 0) geometry_info.sigma=argument_list[2].real_reference; if (attribute_flag[3] != 0) - QueryColorDatabase(argument_list[3].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&image->background_color,exception); if (attribute_flag[4] != 0) - QueryColorDatabase(argument_list[4].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[4].string_reference, + AllCompliance,&image->background_color,exception); image=ShearImage(image,geometry_info.rho,geometry_info.sigma, exception); break; @@ -7972,20 +7978,20 @@ Mogrify(ref,...) (void) CloneString(&draw_info->density, argument_list[3].string_reference); if (attribute_flag[4] != 0) - (void) QueryColorDatabase(argument_list[4].string_reference, - &draw_info->undercolor,exception); + (void) QueryColorCompliance(argument_list[4].string_reference, + AllCompliance,&draw_info->undercolor,exception); if (attribute_flag[5] != 0) { - (void) QueryColorDatabase(argument_list[5].string_reference, - &draw_info->stroke,exception); + (void) QueryColorCompliance(argument_list[5].string_reference, + AllCompliance,&draw_info->stroke,exception); if (argument_list[5].image_reference != (Image *) NULL) draw_info->stroke_pattern=CloneImage( argument_list[5].image_reference,0,0,MagickTrue,exception); } if (attribute_flag[6] != 0) { - (void) QueryColorDatabase(argument_list[6].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[6].string_reference, + AllCompliance,&draw_info->fill,exception); if (argument_list[6].image_reference != (Image *) NULL) draw_info->fill_pattern=CloneImage( argument_list[6].image_reference,0,0,MagickTrue,exception); @@ -8000,10 +8006,11 @@ Mogrify(ref,...) geometry_info.sigma=geometry_info.xi; } if (attribute_flag[8] != 0) - (void) QueryColorDatabase(argument_list[8].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[8].string_reference, + AllCompliance,&draw_info->fill,exception); if (attribute_flag[11] != 0) - draw_info->gravity=(GravityType) argument_list[11].integer_reference; + draw_info->gravity=(GravityType) + argument_list[11].integer_reference; if (attribute_flag[25] != 0) { AV @@ -8185,15 +8192,15 @@ Mogrify(ref,...) if (attribute_flag[2] != 0) geometry.y=argument_list[2].integer_reference; if (attribute_flag[3] != 0) - (void) QueryColorDatabase(argument_list[3].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&draw_info->fill,exception); (void) GetOneVirtualMagickPixel(image,geometry.x,geometry.y,&target, exception); invert=MagickFalse; if (attribute_flag[4] != 0) { - QueryMagickColor(argument_list[4].string_reference,&target, - exception); + QueryMagickColorCompliance(argument_list[4].string_reference, + AllCompliance,&target,exception); invert=MagickTrue; } if (attribute_flag[5] != 0) @@ -8273,7 +8280,8 @@ Mogrify(ref,...) for (x=0; x < (ssize_t) composite_image->columns; x++) { if (GetPixelAlpha(image,q) == OpaqueAlpha) - SetPixelAlpha(composite_image,ClampToQuantum(opacity),q); + SetPixelAlpha(composite_image,ClampToQuantum(opacity), + q); q+=GetPixelChannels(composite_image); } sync=SyncCacheViewAuthenticPixels(composite_view,exception); @@ -8284,8 +8292,8 @@ Mogrify(ref,...) } } if (attribute_flag[9] != 0) /* "color=>" */ - QueryColorDatabase(argument_list[9].string_reference, - &composite_image->background_color,exception); + QueryColorCompliance(argument_list[9].string_reference, + AllCompliance,&composite_image->background_color,exception); if (attribute_flag[12] != 0) /* "interpolate=>" */ image->interpolate=(PixelInterpolateMethod) argument_list[12].integer_reference; @@ -8471,16 +8479,16 @@ Mogrify(ref,...) } if (attribute_flag[3] != 0) { - (void) QueryColorDatabase(argument_list[3].string_reference, - &draw_info->stroke,exception); + (void) QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&draw_info->stroke,exception); if (argument_list[3].image_reference != (Image *) NULL) draw_info->stroke_pattern=CloneImage( argument_list[3].image_reference,0,0,MagickTrue,exception); } if (attribute_flag[4] != 0) { - (void) QueryColorDatabase(argument_list[4].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[4].string_reference, + AllCompliance,&draw_info->fill,exception); if (argument_list[4].image_reference != (Image *) NULL) draw_info->fill_pattern=CloneImage( argument_list[4].image_reference,0,0,MagickTrue,exception); @@ -8491,8 +8499,8 @@ Mogrify(ref,...) (void) CloneString(&draw_info->font, argument_list[6].string_reference); if (attribute_flag[7] != 0) - (void) QueryColorDatabase(argument_list[7].string_reference, - &draw_info->border_color,exception); + (void) QueryColorCompliance(argument_list[7].string_reference, + AllCompliance,&draw_info->border_color,exception); if (attribute_flag[8] != 0) draw_info->affine.tx=argument_list[8].real_reference; if (attribute_flag[9] != 0) @@ -8749,8 +8757,8 @@ Mogrify(ref,...) (void) GetOneVirtualMagickPixel(image,geometry.x,geometry.y,&target, exception); if (attribute_flag[4] != 0) - QueryMagickColor(argument_list[4].string_reference,&target, - exception); + QueryMagickColorCompliance(argument_list[4].string_reference, + AllCompliance,&target,exception); if (attribute_flag[3] != 0) target.alpha=SiPrefixToDouble(argument_list[3].string_reference, QuantumRange); @@ -8839,14 +8847,16 @@ Mogrify(ref,...) fill_color, target; - (void) QueryMagickColor("none",&target,exception); - (void) QueryMagickColor("none",&fill_color,exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&target, + exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&fill_color, + exception); if (attribute_flag[0] != 0) - (void) QueryMagickColor(argument_list[0].string_reference, - &target,exception); + (void) QueryMagickColorCompliance(argument_list[0].string_reference, + AllCompliance,&target,exception); if (attribute_flag[1] != 0) - (void) QueryMagickColor(argument_list[1].string_reference, - &fill_color,exception); + (void) QueryMagickColorCompliance(argument_list[1].string_reference, + AllCompliance,&fill_color,exception); if (attribute_flag[2] != 0) image->fuzz=SiPrefixToDouble(argument_list[2].string_reference, QuantumRange); @@ -8880,10 +8890,11 @@ Mogrify(ref,...) MagickTrue : MagickFalse; if (attribute_flag[4] != 0) quantize_info->measure_error= - argument_list[4].integer_reference != 0 ? MagickTrue : MagickFalse; + argument_list[4].integer_reference != 0 ? MagickTrue : + MagickFalse; if (attribute_flag[5] != 0) - (void) QueryColorDatabase(argument_list[5].string_reference, - &image->transparent_color,exception); + (void) QueryColorCompliance(argument_list[5].string_reference, + AllCompliance,&image->transparent_color,exception); if (attribute_flag[5] && argument_list[5].integer_reference) { (void) QuantizeImages(quantize_info,image,exception); @@ -9012,10 +9023,11 @@ Mogrify(ref,...) PixelInfo target; - (void) QueryMagickColor("none",&target,exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&target, + exception); if (attribute_flag[0] != 0) - (void) QueryMagickColor(argument_list[0].string_reference,&target, - exception); + (void) QueryMagickColorCompliance(argument_list[0].string_reference, + AllCompliance,&target,exception); opacity=TransparentAlpha; if (attribute_flag[1] != 0) opacity=SiPrefixToDouble(argument_list[1].string_reference, @@ -9544,8 +9556,8 @@ Mogrify(ref,...) image->interpolate=(PixelInterpolateMethod) argument_list[6].integer_reference; if (attribute_flag[7] != 0) - QueryColorDatabase(argument_list[7].string_reference, - &image->background_color,exception); + QueryColorCompliance(argument_list[7].string_reference, + AllCompliance,&image->background_color,exception); image=AffineTransformImage(image,&draw_info->affine,exception); draw_info=DestroyDrawInfo(draw_info); break; @@ -9701,8 +9713,8 @@ Mogrify(ref,...) GetPixelInfo(image,&tint); if (attribute_flag[0] != 0) - (void) QueryMagickColor(argument_list[0].string_reference,&tint, - exception); + (void) QueryMagickColorCompliance(argument_list[0].string_reference, + AllCompliance,&tint,exception); if (attribute_flag[1] == 0) argument_list[1].string_reference="100"; image=TintImage(image,argument_list[1].string_reference,&tint, @@ -9735,8 +9747,8 @@ Mogrify(ref,...) image->fuzz=SiPrefixToDouble(argument_list[5].string_reference, QuantumRange); if (attribute_flag[6] != 0) - (void) QueryColorDatabase(argument_list[6].string_reference, - &image->background_color,exception); + (void) QueryColorCompliance(argument_list[6].string_reference, + AllCompliance,&image->background_color,exception); if (attribute_flag[7] != 0) image->gravity=(GravityType) argument_list[7].integer_reference; image=SpliceImage(image,&geometry,exception); @@ -9860,8 +9872,8 @@ Mogrify(ref,...) image->fuzz=SiPrefixToDouble(argument_list[5].string_reference, QuantumRange); if (attribute_flag[6] != 0) - (void) QueryColorDatabase(argument_list[6].string_reference, - &image->background_color,exception); + (void) QueryColorCompliance(argument_list[6].string_reference, + AllCompliance,&image->background_color,exception); image=ExtentImage(image,&geometry,exception); break; } @@ -9887,8 +9899,8 @@ Mogrify(ref,...) if (attribute_flag[4] != 0) geometry_info.psi=argument_list[4].integer_reference; if (attribute_flag[5] != 0) - (void) QueryColorDatabase(argument_list[5].string_reference, - &image->background_color,exception); + (void) QueryColorCompliance(argument_list[5].string_reference, + AllCompliance,&image->background_color,exception); image=VignetteImage(image,geometry_info.rho,geometry_info.sigma, (ssize_t) ceil(geometry_info.xi-0.5),(ssize_t) ceil(geometry_info.psi- 0.5),exception); @@ -10175,11 +10187,11 @@ Mogrify(ref,...) (void) CloneString(&draw_info->font, argument_list[2].string_reference); if (attribute_flag[3] != 0) - (void) QueryColorDatabase(argument_list[3].string_reference, - &draw_info->stroke,exception); + (void) QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&draw_info->stroke,exception); if (attribute_flag[4] != 0) - (void) QueryColorDatabase(argument_list[4].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[4].string_reference, + AllCompliance,&draw_info->fill,exception); if (attribute_flag[5] != 0) draw_info->stroke_width=argument_list[5].real_reference; if (attribute_flag[6] != 0) @@ -10187,8 +10199,8 @@ Mogrify(ref,...) if (attribute_flag[7] != 0) draw_info->gravity=(GravityType) argument_list[7].integer_reference; if (attribute_flag[8] != 0) - (void) QueryColorDatabase(argument_list[8].string_reference, - &image->background_color,exception); + (void) QueryColorCompliance(argument_list[8].string_reference, + AllCompliance,&image->background_color,exception); method=UndefinedInterpolatePixel; if (attribute_flag[9] != 0) method=(PixelInterpolateMethod) argument_list[9].integer_reference; @@ -10217,13 +10229,13 @@ Mogrify(ref,...) if (attribute_flag[2] != 0) geometry.y=argument_list[2].integer_reference; if (attribute_flag[3] != 0) - (void) QueryColorDatabase(argument_list[3].string_reference, - &draw_info->fill,exception); + (void) QueryColorCompliance(argument_list[3].string_reference, + AllCompliance,&draw_info->fill,exception); (void) GetOneVirtualMagickPixel(image,geometry.x,geometry.y,&target, exception); if (attribute_flag[4] != 0) - QueryMagickColor(argument_list[4].string_reference,&target, - exception); + QueryMagickColorCompliance(argument_list[4].string_reference, + AllCompliance,&target,exception); if (attribute_flag[5] != 0) image->fuzz=SiPrefixToDouble(argument_list[5].string_reference, QuantumRange); @@ -10565,14 +10577,18 @@ Mogrify(ref,...) black_point, white_point; - (void) QueryMagickColor("#000000",&black_point,exception); - (void) QueryMagickColor("#ffffff",&white_point,exception); + (void) QueryMagickColorCompliance("#000000",AllCompliance, + &black_point,exception); + (void) QueryMagickColorCompliance("#ffffff",AllCompliance, + &white_point,exception); if (attribute_flag[1] != 0) - (void) QueryMagickColor(argument_list[1].string_reference, - &black_point,exception); + (void) QueryMagickColorCompliance( + argument_list[1].string_reference,AllCompliance,&black_point, + exception); if (attribute_flag[2] != 0) - (void) QueryMagickColor(argument_list[2].string_reference, - &white_point,exception); + (void) QueryMagickColorCompliance( + argument_list[2].string_reference,AllCompliance,&white_point, + exception); if (attribute_flag[3] != 0) channel=(ChannelType) argument_list[3].integer_reference; channel_mask=SetPixelChannelMask(image,channel); @@ -10699,10 +10715,11 @@ Mogrify(ref,...) PixelInfo color; - (void) QueryMagickColor("none",&color,exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&color, + exception); if (attribute_flag[0] != 0) - (void) QueryMagickColor(argument_list[0].string_reference, - &color,exception); + (void) QueryMagickColorCompliance(argument_list[0].string_reference, + AllCompliance,&color,exception); (void) SetImageColor(image,&color); break; } @@ -10887,7 +10904,8 @@ Montage(ref,...) */ info=GetPackageInfo(aTHX_ (void *) av,info,exception); montage_info=CloneMontageInfo(info->image_info,(MontageInfo *) NULL); - (void) QueryMagickColor("none",&transparent_color,exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&transparent_color, + exception); for (i=2; i < items; i+=2) { attribute=(char *) SvPV(ST(i-1),na); @@ -10898,7 +10916,7 @@ Montage(ref,...) { if (LocaleCompare(attribute,"background") == 0) { - (void) QueryColorDatabase(SvPV(ST(i),na), + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, &montage_info->background_color,exception); for (next=image; next; next=next->next) next->background_color=montage_info->background_color; @@ -10911,7 +10929,7 @@ Montage(ref,...) } if (LocaleCompare(attribute,"bordercolor") == 0) { - (void) QueryColorDatabase(SvPV(ST(i),na), + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, &montage_info->border_color,exception); for (next=image; next; next=next->next) next->border_color=montage_info->border_color; @@ -10952,8 +10970,8 @@ Montage(ref,...) { if (LocaleCompare(attribute,"fill") == 0) { - (void) QueryColorDatabase(SvPV(ST(i),na),&montage_info->fill, - exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &montage_info->fill,exception); break; } if (LocaleCompare(attribute,"font") == 0) @@ -11044,7 +11062,7 @@ Montage(ref,...) { if (LocaleCompare(attribute,"mattecolor") == 0) { - (void) QueryColorDatabase(SvPV(ST(i),na), + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, &montage_info->matte_color,exception); for (next=image; next; next=next->next) next->matte_color=montage_info->matte_color; @@ -11055,8 +11073,8 @@ Montage(ref,...) ssize_t in; - in=!SvPOK(ST(i)) ? SvIV(ST(i)) : - ParseCommandOption(MagickModeOptions,MagickFalse,SvPV(ST(i),na)); + in=!SvPOK(ST(i)) ? SvIV(ST(i)) : ParseCommandOption( + MagickModeOptions,MagickFalse,SvPV(ST(i),na)); switch (in) { default: @@ -11122,8 +11140,8 @@ Montage(ref,...) } if (LocaleCompare(attribute,"stroke") == 0) { - (void) QueryColorDatabase(SvPV(ST(i),na),&montage_info->stroke, - exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &montage_info->stroke,exception); break; } ThrowPerlException(exception,OptionError,"UnrecognizedAttribute", @@ -11162,7 +11180,8 @@ Montage(ref,...) PixelInfo transparent_color; - QueryMagickColor(SvPV(ST(i),na),&transparent_color,exception); + QueryMagickColorCompliance(SvPV(ST(i),na),AllCompliance, + &transparent_color,exception); for (next=image; next; next=next->next) (void) TransparentPaintImage(next,&transparent_color, TransparentAlpha,MagickFalse,exception); @@ -11799,7 +11818,7 @@ QueryColor(ref,...) for (i=1; i < items; i++) { name=(char *) SvPV(ST(i),na); - if (QueryMagickColor(name,&color,exception) == MagickFalse) + if (QueryMagickColorCompliance(name,AllCompliance,&color,exception) == MagickFalse) { PUSHs(&sv_undef); continue; @@ -11881,7 +11900,8 @@ QueryColorname(ref,...) EXTEND(sp,items); for (i=1; i < items; i++) { - (void) QueryColorDatabase(SvPV(ST(i),na),&target_color,exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance,&target_color, + exception); (void) QueryColorname(image,&target_color,SVGCompliance,message, exception); PUSHs(sv_2mortal(newSVpv(message,0))); @@ -12171,8 +12191,8 @@ QueryFontMetrics(ref,...) if (LocaleCompare(attribute,"fill") == 0) { if (info) - (void) QueryColorDatabase(SvPV(ST(i),na),&draw_info->fill, - &image->exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &draw_info->fill,&image->exception); break; } if (LocaleCompare(attribute,"font") == 0) @@ -12293,8 +12313,8 @@ QueryFontMetrics(ref,...) if (LocaleCompare(attribute,"stroke") == 0) { if (info) - (void) QueryColorDatabase(SvPV(ST(i),na),&draw_info->stroke, - &image->exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &draw_info->stroke,&image->exception); break; } if (LocaleCompare(attribute,"style") == 0) @@ -12576,8 +12596,8 @@ QueryMultilineFontMetrics(ref,...) if (LocaleCompare(attribute,"fill") == 0) { if (info) - (void) QueryColorDatabase(SvPV(ST(i),na),&draw_info->fill, - &image->exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &draw_info->fill,&image->exception); break; } if (LocaleCompare(attribute,"font") == 0) @@ -12666,8 +12686,8 @@ QueryMultilineFontMetrics(ref,...) if (LocaleCompare(attribute,"stroke") == 0) { if (info) - (void) QueryColorDatabase(SvPV(ST(i),na),&draw_info->stroke, - &image->exception); + (void) QueryColorCompliance(SvPV(ST(i),na),AllCompliance, + &draw_info->stroke,&image->exception); break; } if (LocaleCompare(attribute,"style") == 0) diff --git a/coders/aai.c b/coders/aai.c index f4367a866..490d812c3 100644 --- a/coders/aai.c +++ b/coders/aai.c @@ -132,7 +132,7 @@ static Image *ReadAAIImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -215,7 +215,7 @@ static Image *ReadAAIImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/art.c b/coders/art.c index 42ccd5eba..c102f0288 100644 --- a/coders/art.c +++ b/coders/art.c @@ -128,7 +128,7 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/avs.c b/coders/avs.c index 20cb2374d..2127d9057 100644 --- a/coders/avs.c +++ b/coders/avs.c @@ -131,7 +131,7 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -212,7 +212,7 @@ static Image *ReadAVSImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/bgr.c b/coders/bgr.c index 774a61256..d598b865b 100644 --- a/coders/bgr.c +++ b/coders/bgr.c @@ -138,7 +138,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); image->colorspace=RGBColorspace; @@ -929,7 +929,7 @@ static Image *ReadBGRImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/bmp.c b/coders/bmp.c index 1448fe682..6efd7f9c4 100644 --- a/coders/bmp.c +++ b/coders/bmp.c @@ -539,7 +539,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -1323,7 +1323,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Acquire next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/cals.c b/coders/cals.c index c3ad21c2a..f32e61ff7 100644 --- a/coders/cals.c +++ b/coders/cals.c @@ -185,7 +185,7 @@ static Image *ReadCALSImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/caption.c b/coders/caption.c index 61826ad73..b12136d1c 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -125,7 +125,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if (image->columns == 0) ThrowReaderException(OptionError,"MustSpecifyImageSize"); (void) ResetImagePage(image,"0x0+0+0"); diff --git a/coders/cin.c b/coders/cin.c index 0ec21d4f3..5a2202ff3 100644 --- a/coders/cin.c +++ b/coders/cin.c @@ -425,7 +425,7 @@ static Image *ReadCINImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/clipboard.c b/coders/clipboard.c index 57838fe7e..66fcb9407 100644 --- a/coders/clipboard.c +++ b/coders/clipboard.c @@ -123,7 +123,7 @@ static Image *ReadCLIPBOARDImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); { HBITMAP bitmapH; diff --git a/coders/cmyk.c b/coders/cmyk.c index e9d1bba1e..5a102c26b 100644 --- a/coders/cmyk.c +++ b/coders/cmyk.c @@ -137,7 +137,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); image->colorspace=CMYKColorspace; @@ -1046,7 +1046,7 @@ static Image *ReadCMYKImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/cut.c b/coders/cut.c index 2b7b93474..6c4c977dc 100644 --- a/coders/cut.c +++ b/coders/cut.c @@ -325,7 +325,7 @@ static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -417,7 +417,7 @@ static Image *ReadCUTImage(const ImageInfo *image_info,ExceptionInfo *exception) } } - if( (palette=AcquireImage(clone_info))==NULL ) goto NoPalette; + if( (palette=AcquireImage(clone_info,exception))==NULL ) goto NoPalette; status=OpenBlob(clone_info,palette,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/dcm.c b/coders/dcm.c index c03710dde..3cf291e26 100644 --- a/coders/dcm.c +++ b/coders/dcm.c @@ -2873,7 +2873,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -4068,7 +4068,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/dds.c b/coders/dds.c index 0421b7573..56385a48f 100644 --- a/coders/dds.c +++ b/coders/dds.c @@ -266,7 +266,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -370,7 +370,7 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception) if (n != 0) { /* Start a new image */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image = DestroyImageList(image); diff --git a/coders/dib.c b/coders/dib.c index 7cf148c15..80019d2a6 100644 --- a/coders/dib.c +++ b/coders/dib.c @@ -501,7 +501,7 @@ static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/djvu.c b/coders/djvu.c index 2f803a552..2a664c80f 100644 --- a/coders/djvu.c +++ b/coders/djvu.c @@ -780,7 +780,7 @@ static Image *ReadDJVUImage(const ImageInfo *image_info, logging = LogMagickEvent(CoderEvent,GetMagickModule(),"enter ReadDJVUImage()"); (void) logging; - image = AcquireImage(image_info); /* mmc: ?? */ + image = AcquireImage(image_info,exception); /* mmc: ?? */ lc = (LoadContext *) NULL; diff --git a/coders/dng.c b/coders/dng.c index fc29a69d3..97e451493 100644 --- a/coders/dng.c +++ b/coders/dng.c @@ -114,7 +114,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -126,7 +126,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Convert DNG to PPM with delegate. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); read_info=CloneImageInfo(image_info); SetImageInfoBlob(read_info,(void *) NULL,0); (void) InvokeDelegate(read_info,image,"dng:decode",(char *) NULL,exception); diff --git a/coders/dot.c b/coders/dot.c index 180d8f26d..eea9cc62a 100644 --- a/coders/dot.c +++ b/coders/dot.c @@ -125,7 +125,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) return((Image *) NULL); diff --git a/coders/dps.c b/coders/dps.c index 7bebc2944..7dcdb0996 100644 --- a/coders/dps.c +++ b/coders/dps.c @@ -179,7 +179,7 @@ static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Open image file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) return((Image *) NULL); diff --git a/coders/dpx.c b/coders/dpx.c index 7cb751ae1..014451bb7 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -587,7 +587,7 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/emf.c b/coders/emf.c index 737091a20..70fb87520 100644 --- a/coders/emf.c +++ b/coders/emf.c @@ -467,7 +467,7 @@ static Image *ReadEMFImage(const ImageInfo *image_info, width, y; - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); hemf=ReadEnhMetaFile(image_info->filename,&width,&height); if (hemf == (HENHMETAFILE) NULL) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); diff --git a/coders/ept.c b/coders/ept.c index b2527cbe6..2f378f83b 100644 --- a/coders/ept.c +++ b/coders/ept.c @@ -184,7 +184,7 @@ static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/exr.c b/coders/exr.c index 94a6cf5fb..d54f3abf8 100644 --- a/coders/exr.c +++ b/coders/exr.c @@ -174,7 +174,7 @@ static Image *ReadEXRImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/fax.c b/coders/fax.c index ad02240bc..f618c2027 100644 --- a/coders/fax.c +++ b/coders/fax.c @@ -145,7 +145,7 @@ static Image *ReadFAXImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/fits.c b/coders/fits.c index 1bb86ca7a..39f108a0f 100644 --- a/coders/fits.c +++ b/coders/fits.c @@ -288,7 +288,7 @@ static Image *ReadFITSImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -477,7 +477,7 @@ static Image *ReadFITSImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/fpx.c b/coders/fpx.c index 289f5504e..28d8d70a5 100644 --- a/coders/fpx.c +++ b/coders/fpx.c @@ -218,7 +218,7 @@ static Image *ReadFPXImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/gif.c b/coders/gif.c index 4b5caf190..16b424758 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -1007,7 +1007,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -1205,7 +1205,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/gradient.c b/coders/gradient.c index 7f2e1b2ec..8e71e338b 100644 --- a/coders/gradient.c +++ b/coders/gradient.c @@ -94,13 +94,16 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, char colorname[MaxTextExtent]; + Image + *image; + + MagickBooleanType + status; + PixelPacket start_color, stop_color; - Image - *image; - /* Initialize Image structure. */ @@ -111,14 +114,15 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); (void) SetImageOpacity(image,(Quantum) TransparentAlpha); (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent); (void) CopyMagickString(colorname,image_info->filename,MaxTextExtent); (void) sscanf(image_info->filename,"%[^-]",colorname); - if (QueryColorDatabase(colorname,&start_color,exception) == MagickFalse) + status=QueryColorCompliance(colorname,AllCompliance,&start_color,exception); + if (status == MagickFalse) { image=DestroyImage(image); return((Image *) NULL); @@ -127,7 +131,8 @@ static Image *ReadGRADIENTImage(const ImageInfo *image_info, if (GetPixelPacketIntensity(&start_color) > (Quantum) (QuantumRange/2)) (void) CopyMagickString(colorname,"black",MaxTextExtent); (void) sscanf(image_info->filename,"%*[^-]-%s",colorname); - if (QueryColorDatabase(colorname,&stop_color,exception) == MagickFalse) + status=QueryColorCompliance(colorname,AllCompliance,&stop_color,exception); + if (status == MagickFalse) { image=DestroyImage(image); return((Image *) NULL); diff --git a/coders/gray.c b/coders/gray.c index 2983c289b..8b2c3106e 100644 --- a/coders/gray.c +++ b/coders/gray.c @@ -135,7 +135,7 @@ static Image *ReadGRAYImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -255,7 +255,7 @@ static Image *ReadGRAYImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/hald.c b/coders/hald.c index ddd870dcf..f4411530f 100644 --- a/coders/hald.c +++ b/coders/hald.c @@ -113,7 +113,7 @@ static Image *ReadHALDImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); level=0; if (*image_info->filename != '\0') level=StringToUnsignedLong(image_info->filename); diff --git a/coders/hdr.c b/coders/hdr.c index 8281e40e6..06ab46d39 100644 --- a/coders/hdr.c +++ b/coders/hdr.c @@ -182,7 +182,7 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/histogram.c b/coders/histogram.c index 405e645bc..be8b2bfa3 100644 --- a/coders/histogram.c +++ b/coders/histogram.c @@ -292,8 +292,8 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info, /* Initialize histogram image. */ - (void) QueryColorDatabase("#000000",&histogram_image->background_color, - exception); + (void) QueryColorCompliance("#000000",AllCompliance, + &histogram_image->background_color,exception); (void) SetImageBackgroundColor(histogram_image); for (x=0; x < (ssize_t) histogram_image->columns; x++) { diff --git a/coders/hrz.c b/coders/hrz.c index 4cc6ce855..32c5b2b8d 100644 --- a/coders/hrz.c +++ b/coders/hrz.c @@ -129,7 +129,7 @@ static Image *ReadHRZImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/icon.c b/coders/icon.c index 7d23860e6..0ed47e42e 100644 --- a/coders/icon.c +++ b/coders/icon.c @@ -214,7 +214,7 @@ static Image *ReadICONImage(const ImageInfo *image_info, (void) LogMagickEvent(CoderEvent,GetMagickModule(),"%s",image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -635,7 +635,7 @@ static Image *ReadICONImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/inline.c b/coders/inline.c index 4ed5e8c59..2c7f23af8 100644 --- a/coders/inline.c +++ b/coders/inline.c @@ -126,7 +126,7 @@ static Image *ReadINLINEImage(const ImageInfo *image_info, assert(exception->signature == MagickSignature); if (LocaleNCompare(image_info->filename,"data:",5) == 0) return(ReadInlineImage(image_info,image_info->filename,exception)); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/ipl.c b/coders/ipl.c index e6c0ebe8a..dcaa9a648 100644 --- a/coders/ipl.c +++ b/coders/ipl.c @@ -205,7 +205,7 @@ static Image *ReadIPLImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -396,7 +396,7 @@ static Image *ReadIPLImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Proceed to next image. */ - AcquireNextImage(image_info, image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/jbig.c b/coders/jbig.c index 4ccf6313e..1304e9bd2 100644 --- a/coders/jbig.c +++ b/coders/jbig.c @@ -147,7 +147,7 @@ static Image *ReadJBIGImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/jp2.c b/coders/jp2.c index 2835152b8..cc8d33cad 100644 --- a/coders/jp2.c +++ b/coders/jp2.c @@ -383,7 +383,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/jpeg.c b/coders/jpeg.c index 42c80e4ed..060c8ba15 100644 --- a/coders/jpeg.c +++ b/coders/jpeg.c @@ -997,7 +997,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info, assert(exception->signature == MagickSignature); debug=IsEventLogging(); (void) debug; - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/label.c b/coders/label.c index f3bd5ebbf..04a3a63b2 100644 --- a/coders/label.c +++ b/coders/label.c @@ -121,7 +121,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); (void) ResetImagePage(image,"0x0+0+0"); property=InterpretImageProperties(image_info,image,image_info->filename, exception); diff --git a/coders/mac.c b/coders/mac.c index 5ddcf7e8a..7f629d364 100644 --- a/coders/mac.c +++ b/coders/mac.c @@ -127,7 +127,7 @@ static Image *ReadMACImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/map.c b/coders/map.c index 7ee63f9c9..f864b5738 100644 --- a/coders/map.c +++ b/coders/map.c @@ -143,7 +143,7 @@ static Image *ReadMAPImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); diff --git a/coders/mat.c b/coders/mat.c index 655599272..f5a852b0a 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -550,7 +550,7 @@ DblBreak: RelinquishMagickMemory(DecompressBlock); if((clone_info->file=fopen(clone_info->filename,"rb"))==NULL) goto UnlinkFile; - if( (image2 = AcquireImage(clone_info))==NULL ) goto EraseFile; + if( (image2 = AcquireImage(clone_info,exception))==NULL ) goto EraseFile; status = OpenBlob(clone_info,image2,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -644,7 +644,7 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Open image file. */ - image = AcquireImage(image_info); + image = AcquireImage(image_info,exception); status = OpenBlob(image_info, image, ReadBinaryBlobMode, exception); if (status == MagickFalse) @@ -1005,7 +1005,7 @@ done_reading: } /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (image->next == (Image *) NULL) break; image=SyncNextImageInList(image); image->columns=image->rows=0; diff --git a/coders/meta.c b/coders/meta.c index 788101298..86a2cc908 100644 --- a/coders/meta.c +++ b/coders/meta.c @@ -1093,7 +1093,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -1114,7 +1114,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, /* Read 8BIM binary metadata. */ - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); blob=(unsigned char *) AcquireQuantumMemory(length,sizeof(unsigned char)); @@ -1164,7 +1164,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, name[MaxTextExtent]; (void) FormatLocaleString(name,MaxTextExtent,"APP%d",1); - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); blob=(unsigned char *) AcquireQuantumMemory(length,sizeof(unsigned char)); @@ -1190,7 +1190,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, ThrowReaderException(CoderError,"NoIPTCProfileAvailable"); } profile=CloneStringInfo((StringInfo *) image_info->profile); - iptc=AcquireImage((ImageInfo *) NULL); + iptc=AcquireImage((ImageInfo *) NULL,exception); if (iptc == (Image *) NULL) { blob=DetachBlob(buff->blob); @@ -1270,7 +1270,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, if ((LocaleCompare(image_info->magick,"ICC") == 0) || (LocaleCompare(image_info->magick,"ICM") == 0)) { - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); blob=(unsigned char *) AcquireQuantumMemory(length,sizeof(unsigned char)); @@ -1302,7 +1302,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, register unsigned char *p; - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); blob=(unsigned char *) AcquireQuantumMemory(length,sizeof(unsigned char)); @@ -1354,7 +1354,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info, } if (LocaleCompare(image_info->magick,"XMP") == 0) { - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); blob=(unsigned char *) AcquireQuantumMemory(length,sizeof(unsigned char)); @@ -2315,7 +2315,7 @@ static MagickBooleanType WriteMETAImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); AttachBlob(buff->blob,GetStringInfoDatum(profile), @@ -2349,7 +2349,7 @@ static MagickBooleanType WriteMETAImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); - buff=AcquireImage((ImageInfo *) NULL); + buff=AcquireImage((ImageInfo *) NULL,exception); if (buff == (Image *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); AttachBlob(buff->blob,info,length); diff --git a/coders/miff.c b/coders/miff.c index f2626864d..dcbcfbd1f 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -480,7 +480,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -608,8 +608,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, { if (LocaleCompare(keyword,"background-color") == 0) { - (void) QueryColorDatabase(options,&image->background_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->background_color,exception); break; } if (LocaleCompare(keyword,"blue-primary") == 0) @@ -624,8 +624,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, } if (LocaleCompare(keyword,"border-color") == 0) { - (void) QueryColorDatabase(options,&image->border_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->border_color,exception); break; } (void) SetImageProperty(image,keyword,options); @@ -795,8 +795,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, } if (LocaleCompare(keyword,"matte-color") == 0) { - (void) QueryColorDatabase(options,&image->matte_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->matte_color,exception); break; } if (LocaleCompare(keyword,"montage") == 0) @@ -1520,7 +1520,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/mono.c b/coders/mono.c index 3cea1bb76..aa0b0a6f6 100644 --- a/coders/mono.c +++ b/coders/mono.c @@ -127,7 +127,7 @@ static Image *ReadMONOImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); diff --git a/coders/mpc.c b/coders/mpc.c index c3b03ab0c..c2d17a280 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -196,7 +196,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -324,8 +324,8 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) { if (LocaleCompare(keyword,"background-color") == 0) { - (void) QueryColorDatabase(options,&image->background_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->background_color,exception); break; } if (LocaleCompare(keyword,"blue-primary") == 0) @@ -340,8 +340,8 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) } if (LocaleCompare(keyword,"border-color") == 0) { - (void) QueryColorDatabase(options,&image->border_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->border_color,exception); break; } (void) SetImageProperty(image,keyword,options); @@ -505,8 +505,8 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) } if (LocaleCompare(keyword,"matte-color") == 0) { - (void) QueryColorDatabase(options,&image->matte_color, - exception); + (void) QueryColorCompliance(options,AllCompliance, + &image->matte_color,exception); break; } if (LocaleCompare(keyword,"maximum-error") == 0) @@ -919,7 +919,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/mpeg.c b/coders/mpeg.c index be44a923c..99e34be38 100644 --- a/coders/mpeg.c +++ b/coders/mpeg.c @@ -188,7 +188,7 @@ static Image *ReadMPEGImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -201,7 +201,7 @@ static Image *ReadMPEGImage(const ImageInfo *image_info, Convert MPEG to PAM with delegate. */ read_info=CloneImageInfo(image_info); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); (void) InvokeDelegate(read_info,image,"mpeg:decode",(char *) NULL,exception); image=DestroyImage(image); (void) FormatLocaleString(read_info->filename,MaxTextExtent,"%s.%s", diff --git a/coders/msl.c b/coders/msl.c index 220e48ce4..71b95580b 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -49,8 +49,8 @@ #include "MagickCore/cache.h" #include "MagickCore/cache-view.h" #include "MagickCore/color.h" -#include "MagickCore/colormap.h" #include "MagickCore/color-private.h" +#include "MagickCore/colormap.h" #include "MagickCore/composite.h" #include "MagickCore/constitute.h" #include "MagickCore/decorate.h" @@ -571,7 +571,8 @@ static void MSLPushImage(MSLInfo *msl_info,Image *image) msl_info->draw_info[n]=CloneDrawInfo(msl_info->image_info[n-1], msl_info->draw_info[n-1]); if (image == (Image *) NULL) - msl_info->attributes[n]=AcquireImage(msl_info->image_info[n]); + msl_info->attributes[n]=AcquireImage(msl_info->image_info[n], + &image->exception); else msl_info->attributes[n]=CloneImage(image,0,0,MagickTrue,&image->exception); msl_info->image[n]=(Image *) image; @@ -860,8 +861,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value,&draw_info->fill, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->fill,&exception); break; } if (LocaleCompare(keyword,"family") == 0) @@ -958,8 +959,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword,"stretch") == 0) { - option=ParseCommandOption(MagickStretchOptions,MagickFalse, - value); + option=ParseCommandOption(MagickStretchOptions, + MagickFalse,value); if (option < 0) ThrowMSLException(OptionError,"UnrecognizedStretchType", value); @@ -968,8 +969,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword, "stroke") == 0) { - (void) QueryColorDatabase(value,&draw_info->stroke, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->stroke,&exception); break; } if (LocaleCompare(keyword,"strokewidth") == 0) @@ -1017,8 +1018,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "undercolor") == 0) { - (void) QueryColorDatabase(value,&draw_info->undercolor, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->undercolor,&exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -1295,7 +1296,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value, + (void) QueryColorCompliance(value,AllCompliance, &msl_info->image[n]->border_color,&exception); break; } @@ -1400,7 +1401,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryColorDatabase(value,&target, + (void) QueryColorCompliance(value,AllCompliance,&target, &msl_info->image[n]->exception); break; } @@ -1658,7 +1659,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"bordercolor") == 0) { - (void) QueryMagickColor(value,&target,&exception); + (void) QueryMagickColorCompliance(value,AllCompliance, + &target,&exception); paint_method=FillToBorderMethod; break; } @@ -1671,8 +1673,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryColorDatabase(value,&draw_info->fill, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->fill,&exception); break; } if (LocaleCompare(keyword,"fuzz") == 0) @@ -1862,7 +1864,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword, "color") == 0) { - (void) QueryColorDatabase(value, + (void) QueryColorCompliance(value,AllCompliance, &composite_image->background_color,&exception); break; } @@ -2480,8 +2482,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value,&draw_info->fill, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->fill,&exception); break; } if (LocaleCompare(keyword,"family") == 0) @@ -2583,8 +2585,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword,"stretch") == 0) { - option=ParseCommandOption(MagickStretchOptions,MagickFalse, - value); + option=ParseCommandOption(MagickStretchOptions, + MagickFalse,value); if (option < 0) ThrowMSLException(OptionError,"UnrecognizedStretchType", value); @@ -2593,8 +2595,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword, "stroke") == 0) { - (void) QueryColorDatabase(value,&draw_info->stroke, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->stroke,&exception); break; } if (LocaleCompare(keyword,"strokewidth") == 0) @@ -2642,8 +2644,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "undercolor") == 0) { - (void) QueryColorDatabase(value,&draw_info->undercolor, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->undercolor,&exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -3070,7 +3072,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value, + (void) QueryColorCompliance(value,AllCompliance, &msl_info->image[n]->matte_color,&exception); break; } @@ -3694,7 +3696,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"bordercolor") == 0) { - (void) QueryMagickColor(value,&target,&exception); + (void) QueryMagickColorCompliance(value,AllCompliance, + &target,&exception); paint_method=FillToBorderMethod; break; } @@ -4230,8 +4233,10 @@ static void MSLStartElement(void *context,const xmlChar *tag, (const char *) tag); break; } - (void) QueryMagickColor("none",&target,&exception); - (void) QueryMagickColor("none",&fill_color,&exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&target, + &exception); + (void) QueryMagickColorCompliance("none",AllCompliance,&fill_color, + &exception); if (attributes != (const xmlChar **) NULL) for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) { @@ -4263,7 +4268,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryMagickColor(value,&fill_color,&exception); + (void) QueryMagickColorCompliance(value,AllCompliance, + &fill_color,&exception); break; } if (LocaleCompare(keyword,"fuzz") == 0) @@ -4649,8 +4655,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value,&draw_info->fill, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->fill,&exception); break; } if (LocaleCompare(keyword,"family") == 0) @@ -4747,8 +4753,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword,"stretch") == 0) { - option=ParseCommandOption(MagickStretchOptions,MagickFalse, - value); + option=ParseCommandOption(MagickStretchOptions, + MagickFalse,value); if (option < 0) ThrowMSLException(OptionError,"UnrecognizedStretchType", value); @@ -4757,8 +4763,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } if (LocaleCompare(keyword, "stroke") == 0) { - (void) QueryColorDatabase(value,&draw_info->stroke, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->stroke,&exception); break; } if (LocaleCompare(keyword,"strokewidth") == 0) @@ -4806,8 +4812,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "undercolor") == 0) { - (void) QueryColorDatabase(value,&draw_info->undercolor, - &exception); + (void) QueryColorCompliance(value,AllCompliance, + &draw_info->undercolor,&exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute", @@ -6551,7 +6557,7 @@ static void MSLStartElement(void *context,const xmlChar *tag, { if (LocaleCompare(keyword, "fill") == 0) { - (void) QueryColorDatabase(value, + (void) QueryColorCompliance(value,AllCompliance, &msl_info->image[n]->background_color,&exception); break; } @@ -7200,7 +7206,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, PixelInfo target; - (void) QueryMagickColor(value,&target,&exception); + (void) QueryMagickColorCompliance(value,AllCompliance,&target, + &exception); (void) TransparentPaintImage(msl_info->image[n],&target, TransparentAlpha,MagickFalse,&msl_info->image[n]->exception); break; @@ -7699,7 +7706,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image_info->filename); assert(image != (Image **) NULL); - msl_image=AcquireImage(image_info); + msl_image=AcquireImage(image_info,exception); status=OpenBlob(image_info,msl_image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -7733,7 +7740,7 @@ static MagickBooleanType ProcessMSLScript(const ImageInfo *image_info,Image **im "UnableToInterpretMSLImage"); *msl_info.image_info=CloneImageInfo(image_info); *msl_info.draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL); - *msl_info.attributes=AcquireImage(image_info); + *msl_info.attributes=AcquireImage(image_info,exception); msl_info.group_info[0].numImages=0; /* the first slot is used to point to the MSL file image */ *msl_info.image=msl_image; @@ -7992,8 +7999,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, { if (LocaleCompare(keyword,"background") == 0) { - (void) QueryColorDatabase(value,&image_info->background_color, - exception); + (void) QueryColorCompliance(value,AllCompliance, + &image_info->background_color,exception); break; } if (LocaleCompare(keyword,"bias") == 0) @@ -8017,8 +8024,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, } if (LocaleCompare(keyword,"bordercolor") == 0) { - (void) QueryColorDatabase(value,&image_info->border_color, - exception); + (void) QueryColorCompliance(value,AllCompliance, + &image_info->border_color,exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); @@ -8041,7 +8048,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, { if (LocaleCompare(keyword,"fill") == 0) { - (void) QueryColorDatabase(value,&draw_info->fill,exception); + (void) QueryColorCompliance(value,AllCompliance,&draw_info->fill, + exception); (void) SetImageOption(image_info,keyword,value); break; } @@ -8091,8 +8099,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, } if (LocaleCompare(keyword,"mattecolor") == 0) { - (void) QueryColorDatabase(value,&image_info->matte_color, - exception); + (void) QueryColorCompliance(value,AllCompliance, + &image_info->matte_color,exception); break; } ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); @@ -8133,7 +8141,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword, } if (LocaleCompare(keyword,"stroke") == 0) { - (void) QueryColorDatabase(value,&draw_info->stroke,exception); + (void) QueryColorCompliance(value,AllCompliance,&draw_info->stroke, + exception); (void) SetImageOption(image_info,keyword,value); break; } diff --git a/coders/mtv.c b/coders/mtv.c index 1bffc8402..6a0ebe1af 100644 --- a/coders/mtv.c +++ b/coders/mtv.c @@ -133,7 +133,7 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -213,7 +213,7 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/mvg.c b/coders/mvg.c index 1591a2e71..9245a7b31 100644 --- a/coders/mvg.c +++ b/coders/mvg.c @@ -147,7 +147,7 @@ static Image *ReadMVGImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/null.c b/coders/null.c index b78f1a30b..842d1d938 100644 --- a/coders/null.c +++ b/coders/null.c @@ -121,7 +121,7 @@ static Image *ReadNULLImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if (image->columns == 0) image->columns=1; if (image->rows == 0) diff --git a/coders/otb.c b/coders/otb.c index 044339655..6985426f2 100644 --- a/coders/otb.c +++ b/coders/otb.c @@ -131,7 +131,7 @@ static Image *ReadOTBImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/palm.c b/coders/palm.c index b8fceb37b..a9f45b92b 100644 --- a/coders/palm.c +++ b/coders/palm.c @@ -309,7 +309,7 @@ static Image *ReadPALMImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -546,7 +546,7 @@ static Image *ReadPALMImage(const ImageInfo *image_info, /* Allocate next image structure. Copied from coders/pnm.c */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { (void) DestroyImageList(image); diff --git a/coders/pattern.c b/coders/pattern.c index 896c51967..510140452 100644 --- a/coders/pattern.c +++ b/coders/pattern.c @@ -988,7 +988,7 @@ static Image *ReadPATTERNImage(const ImageInfo *image_info, Tile pattern across image canvas. */ pattern_image=image; - image=AcquireImage(blob_info); + image=AcquireImage(blob_info,exception); image->background_color=pattern_image->background_color; (void) SetImageBackgroundColor(image); (void) TextureImage(image,pattern_image); diff --git a/coders/pcd.c b/coders/pcd.c index 4828eb382..bc6ed8ee2 100644 --- a/coders/pcd.c +++ b/coders/pcd.c @@ -529,7 +529,7 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -689,7 +689,7 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/pcl.c b/coders/pcl.c index 914af1ba6..50d64a3a7 100644 --- a/coders/pcl.c +++ b/coders/pcl.c @@ -204,7 +204,7 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Open image file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/pcx.c b/coders/pcx.c index 41a173db9..42feec62a 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -278,7 +278,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -653,7 +653,7 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/pdb.c b/coders/pdb.c index 9ad4ad19b..f1d907955 100644 --- a/coders/pdb.c +++ b/coders/pdb.c @@ -316,7 +316,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/pdf.c b/coders/pdf.c index 9b2648806..410495d46 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -377,7 +377,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Open image file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/pes.c b/coders/pes.c index a722d72a3..414eec992 100644 --- a/coders/pes.c +++ b/coders/pes.c @@ -478,7 +478,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/pict.c b/coders/pict.c index 69c754ec9..143fca6c7 100644 --- a/coders/pict.c +++ b/coders/pict.c @@ -845,7 +845,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); image->depth=8; status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) diff --git a/coders/pix.c b/coders/pix.c index e43281976..079784579 100644 --- a/coders/pix.c +++ b/coders/pix.c @@ -125,7 +125,7 @@ static Image *ReadPIXImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -227,7 +227,7 @@ static Image *ReadPIXImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/png.c b/coders/png.c index 20c186649..aa5f73be0 100644 --- a/coders/png.c +++ b/coders/png.c @@ -3633,7 +3633,7 @@ static Image *ReadPNGImage(const ImageInfo *image_info,ExceptionInfo *exception) assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); logging=LogMagickEvent(CoderEvent,GetMagickModule(),"Enter ReadPNGImage()"); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); mng_info=(MngInfo *) NULL; status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -3834,7 +3834,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info, (void) LogMagickEvent(CoderEvent,GetMagickModule(), " AcquireNextImage()"); - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) return((Image *) NULL); @@ -3995,7 +3995,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info, ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); GetImageInfo(color_image_info); - color_image=AcquireImage(color_image_info); + color_image=AcquireImage(color_image_info,exception); if (color_image == (Image *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); @@ -4020,7 +4020,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info, ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); GetImageInfo(alpha_image_info); - alpha_image=AcquireImage(alpha_image_info); + alpha_image=AcquireImage(alpha_image_info,exception); if (alpha_image == (Image *) NULL) { @@ -4498,7 +4498,7 @@ static Image *ReadJNGImage(const ImageInfo *image_info,ExceptionInfo *exception) assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); logging=LogMagickEvent(CoderEvent,GetMagickModule(),"Enter ReadJNGImage()"); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); mng_info=(MngInfo *) NULL; status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -4674,7 +4674,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); logging=LogMagickEvent(CoderEvent,GetMagickModule(),"Enter ReadMNGImage()"); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); mng_info=(MngInfo *) NULL; status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -4876,7 +4876,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) if (GetAuthenticPixelQueue(image) != (Quantum *) NULL) { /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) return((Image *) NULL); @@ -5327,7 +5327,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ if (GetAuthenticPixelQueue(image) != (Quantum *) NULL) { - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { @@ -5881,7 +5881,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { @@ -5934,7 +5934,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { @@ -5983,7 +5983,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { @@ -6178,7 +6178,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Allocate magnified image"); - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { @@ -6750,7 +6750,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); @@ -7656,27 +7656,6 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, " It is not sRGB (%c%c%c%c)",data[52], data[53],data[54],data[55]); - } - else if (length == 60960) - { - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " got a 60960-byte ICC profile (potentially sRGB)"); - - data=GetStringInfoDatum(profile); - - if (data[269]=='s' && data[271]=='R' && - data[273]=='G' && data[275]=='B') - { - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " It is the ICC v4 sRGB)"); - if (image->rendering_intent==UndefinedIntent) - image->rendering_intent=PerceptualIntent; - } - else - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " It is not sRGB (%c%c%c%c)", - data[269],data[271],data[273],data[275]); - } else if (length == 3052) { @@ -7695,8 +7674,8 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, } else (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " It is not sRGB (%c%c%c%c)",data[336], - data[337],data[338],data[339]); + " It is not sRGB (%c%c%c%c)",data[52], + data[53],data[54],data[55]); } else diff --git a/coders/pnm.c b/coders/pnm.c index 85eb53ba4..7a41a0f82 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -271,7 +271,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -1275,7 +1275,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/ps.c b/coders/ps.c index cb3422439..1f08428e5 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -422,7 +422,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/psd.c b/coders/psd.c index e168e5f44..3054257bb 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -784,7 +784,7 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/pwp.c b/coders/pwp.c index 14a9b19e6..027653327 100644 --- a/coders/pwp.c +++ b/coders/pwp.c @@ -165,7 +165,7 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - pwp_image=AcquireImage(image_info); + pwp_image=AcquireImage(image_info,exception); image=pwp_image; status=OpenBlob(image_info,pwp_image,ReadBinaryBlobMode,exception); if (status == MagickFalse) diff --git a/coders/raw.c b/coders/raw.c index e726329af..1ab908715 100644 --- a/coders/raw.c +++ b/coders/raw.c @@ -133,7 +133,7 @@ static Image *ReadRAWImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); @@ -252,7 +252,7 @@ static Image *ReadRAWImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/rgb.c b/coders/rgb.c index 4782dfcec..ff1c65f4d 100644 --- a/coders/rgb.c +++ b/coders/rgb.c @@ -138,7 +138,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); image->colorspace=RGBColorspace; @@ -936,7 +936,7 @@ static Image *ReadRGBImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/rla.c b/coders/rla.c index a9645a26c..8addb7017 100644 --- a/coders/rla.c +++ b/coders/rla.c @@ -197,7 +197,7 @@ static Image *ReadRLAImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/rle.c b/coders/rle.c index 5c0d5cb48..e2900cd8d 100644 --- a/coders/rle.c +++ b/coders/rle.c @@ -189,7 +189,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -573,7 +573,7 @@ static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/scr.c b/coders/scr.c index 9d44d9247..25b8a1e41 100644 --- a/coders/scr.c +++ b/coders/scr.c @@ -147,7 +147,7 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/sct.c b/coders/sct.c index d33c9377f..0f1b4114e 100644 --- a/coders/sct.c +++ b/coders/sct.c @@ -166,7 +166,7 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/sfw.c b/coders/sfw.c index 9db762bea..4c2c51640 100644 --- a/coders/sfw.c +++ b/coders/sfw.c @@ -242,7 +242,7 @@ static Image *ReadSFWImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/sgi.c b/coders/sgi.c index 6a67fd9a0..50445f7e0 100644 --- a/coders/sgi.c +++ b/coders/sgi.c @@ -306,7 +306,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -685,7 +685,7 @@ static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/stegano.c b/coders/stegano.c index f0c52c020..a4c4591e9 100644 --- a/coders/stegano.c +++ b/coders/stegano.c @@ -148,7 +148,7 @@ static Image *ReadSTEGANOImage(const ImageInfo *image_info, assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); one=1; - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); read_info=CloneImageInfo(image_info); diff --git a/coders/sun.c b/coders/sun.c index 9ad0204cd..b5cb53946 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -279,7 +279,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -584,7 +584,7 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/svg.c b/coders/svg.c index 209221bda..faa3f52fb 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -2778,7 +2778,7 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image_info->filename); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/tga.c b/coders/tga.c index c737794a4..2e93d8ce5 100644 --- a/coders/tga.c +++ b/coders/tga.c @@ -179,7 +179,7 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/tiff.c b/coders/tiff.c index 0d7e76a9e..8cb745e0b 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -319,7 +319,7 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -829,7 +829,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -859,7 +859,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, for (i=0; i < (ssize_t) image_info->scene; i++) { (void) TIFFReadDirectory(tiff); - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); @@ -1652,7 +1652,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/tile.c b/coders/tile.c index cb90f4737..cd0e42b16 100644 --- a/coders/tile.c +++ b/coders/tile.c @@ -111,7 +111,7 @@ static Image *ReadTILEImage(const ImageInfo *image_info, read_info=DestroyImageInfo(read_info); if (tile_image == (Image *) NULL) return((Image *) NULL); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); if (*image_info->filename == '\0') diff --git a/coders/tim.c b/coders/tim.c index 3b9cb774b..3e49e9df4 100644 --- a/coders/tim.c +++ b/coders/tim.c @@ -149,7 +149,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -399,7 +399,7 @@ static Image *ReadTIMImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/ttf.c b/coders/ttf.c index 0307c088e..104e0ae4f 100644 --- a/coders/ttf.c +++ b/coders/ttf.c @@ -213,7 +213,7 @@ static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); image->columns=800; image->rows=480; type_info=GetTypeInfo(image_info->filename,exception); diff --git a/coders/txt.c b/coders/txt.c index 84c341b04..1b6e2d4a4 100644 --- a/coders/txt.c +++ b/coders/txt.c @@ -298,7 +298,7 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image, */ *draw_info->text='\0'; offset=2*page.y; - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); @@ -408,7 +408,7 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -490,7 +490,7 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/uyvy.c b/coders/uyvy.c index 03724ecda..f09d9342c 100644 --- a/coders/uyvy.c +++ b/coders/uyvy.c @@ -127,7 +127,7 @@ static Image *ReadUYVYImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); if ((image->columns % 2) != 0) diff --git a/coders/vicar.c b/coders/vicar.c index ddfcb7394..2e7bb7434 100644 --- a/coders/vicar.c +++ b/coders/vicar.c @@ -187,7 +187,7 @@ static Image *ReadVICARImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/vid.c b/coders/vid.c index 469ee8a51..f4ba630ad 100644 --- a/coders/vid.c +++ b/coders/vid.c @@ -138,7 +138,7 @@ static Image *ReadVIDImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); filelist=(char **) AcquireMagickMemory(sizeof(*filelist)); if (filelist == (char **) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); diff --git a/coders/viff.c b/coders/viff.c index dc8c0ec89..5d2c579eb 100644 --- a/coders/viff.c +++ b/coders/viff.c @@ -261,7 +261,7 @@ static Image *ReadVIFFImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { @@ -743,7 +743,7 @@ static Image *ReadVIFFImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/wbmp.c b/coders/wbmp.c index 1a157a0b5..2f77d2f8e 100644 --- a/coders/wbmp.c +++ b/coders/wbmp.c @@ -151,7 +151,7 @@ static Image *ReadWBMPImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/webp.c b/coders/webp.c index f1d92bf43..6c32ed2ac 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -144,7 +144,7 @@ static Image *ReadWEBPImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/wmf.c b/coders/wmf.c index e22994449..bc71baee3 100644 --- a/coders/wmf.c +++ b/coders/wmf.c @@ -150,7 +150,7 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Read WMF image. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/wpg.c b/coders/wpg.c index 5fde906dd..b8e784b3d 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -962,7 +962,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); one=1; - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); image->depth=8; status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) @@ -1168,7 +1168,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, } /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); image->depth=8; if (image->next == (Image *) NULL) goto Finish; @@ -1345,7 +1345,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); image->depth=8; if (image->next == (Image *) NULL) goto Finish; diff --git a/coders/xbm.c b/coders/xbm.c index ababf6a80..eed9831de 100644 --- a/coders/xbm.c +++ b/coders/xbm.c @@ -214,7 +214,7 @@ static Image *ReadXBMImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/xc.c b/coders/xc.c index 4e259700b..eadd53d23 100644 --- a/coders/xc.c +++ b/coders/xc.c @@ -121,13 +121,14 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if (image->columns == 0) image->columns=1; if (image->rows == 0) image->rows=1; (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent); - status=QueryMagickColor((char *) image_info->filename,&color,exception); + status=QueryMagickColorCompliance((char *) image_info->filename,AllCompliance, + &color,exception); if (status == MagickFalse) { image=DestroyImage(image); diff --git a/coders/xcf.c b/coders/xcf.c index 7de9d5936..2ad16635b 100644 --- a/coders/xcf.c +++ b/coders/xcf.c @@ -1005,7 +1005,7 @@ static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/xpm.c b/coders/xpm.c index bf8deb8af..09ae938c4 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -269,7 +269,7 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/xps.c b/coders/xps.c index 0207862dd..274b2785a 100644 --- a/coders/xps.c +++ b/coders/xps.c @@ -157,7 +157,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Open image file. */ - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/xwd.c b/coders/xwd.c index dfdde5f6c..1623e6764 100644 --- a/coders/xwd.c +++ b/coders/xwd.c @@ -209,7 +209,7 @@ static Image *ReadXWDImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { diff --git a/coders/ycbcr.c b/coders/ycbcr.c index b0fa64f37..9ff4db351 100644 --- a/coders/ycbcr.c +++ b/coders/ycbcr.c @@ -144,7 +144,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info, image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); image->colorspace=YCbCrColorspace; @@ -833,7 +833,7 @@ static Image *ReadYCBCRImage(const ImageInfo *image_info, /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/coders/yuv.c b/coders/yuv.c index a0dc1aff1..331c028e7 100644 --- a/coders/yuv.c +++ b/coders/yuv.c @@ -141,7 +141,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception) image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - image=AcquireImage(image_info); + image=AcquireImage(image_info,exception); if ((image->columns == 0) || (image->rows == 0)) ThrowReaderException(OptionError,"MustSpecifyImageSize"); quantum=image->depth <= 8 ? 1 : 2; @@ -439,7 +439,7 @@ static Image *ReadYUVImage(const ImageInfo *image_info,ExceptionInfo *exception) /* Allocate next image structure. */ - AcquireNextImage(image_info,image); + AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { image=DestroyImageList(image); diff --git a/tests/validate.c b/tests/validate.c index cdc492266..859acc2cd 100644 --- a/tests/validate.c +++ b/tests/validate.c @@ -982,7 +982,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info, /* Read reconstruct image. */ - reconstruct_image=AcquireImage(image_info); + reconstruct_image=AcquireImage(image_info,exception); (void) SetImageExtent(reconstruct_image,reference_image->columns, reference_image->rows,exception); (void) SetImageColorspace(reconstruct_image,reference_image->colorspace,