From 5cbc016effaa2d7ee617f46ca0a2371533d4ae17 Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 29 Aug 2011 00:36:28 +0000 Subject: [PATCH] --- Magick++/lib/Image.cpp | 27 +++++-- MagickCore/annotate.c | 152 +++++++++++++++++++++----------------- MagickCore/annotate.h | 9 ++- MagickCore/display.c | 2 +- MagickCore/draw.c | 2 +- MagickCore/effect.c | 2 +- MagickCore/fx.c | 44 ++++++----- MagickCore/fx.h | 4 +- MagickCore/montage.c | 8 +- MagickWand/magick-image.c | 8 +- MagickWand/magick-wand.c | 8 +- MagickWand/mogrify.c | 6 +- PerlMagick/Magick.xs | 14 ++-- PerlMagick/t/Generic.ttf | Bin 0 -> 18444 bytes coders/caption.c | 16 ++-- coders/label.c | 10 +-- coders/msl.c | 9 ++- coders/plasma.c | 2 +- coders/svg.c | 6 +- coders/txt.c | 6 +- 20 files changed, 183 insertions(+), 152 deletions(-) create mode 100644 PerlMagick/t/Generic.ttf diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 9f90d63252..56665e5a87 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -445,14 +445,17 @@ void Magick::Image::annotate ( const std::string &text_, +current.tx; } - AnnotateImage( image(), drawInfo ); + ExceptionInfo exceptionInfo; + GetExceptionInfo( &exceptionInfo ); + AnnotateImage( image(), drawInfo, &exceptionInfo ); // Restore original values drawInfo->affine = oaffine; drawInfo->text = 0; drawInfo->geometry = 0; - throwImageException(); + throwException( exceptionInfo ); + (void) DestroyExceptionInfo( &exceptionInfo ); } // Annotate with text (bounding area is entire image) and placement gravity. void Magick::Image::annotate ( const std::string &text_, @@ -467,12 +470,15 @@ void Magick::Image::annotate ( const std::string &text_, drawInfo->gravity = gravity_; - AnnotateImage( image(), drawInfo ); + ExceptionInfo exceptionInfo; + GetExceptionInfo( &exceptionInfo ); + AnnotateImage( image(), drawInfo, &exceptionInfo ); drawInfo->gravity = NorthWestGravity; drawInfo->text = 0; - throwImageException(); + throwException( exceptionInfo ); + (void) DestroyExceptionInfo( &exceptionInfo ); } // Blur image @@ -1986,9 +1992,12 @@ void Magick::Image::sigmoidalContrast ( const size_t sharpen_, const double cont // film to light during the development process) void Magick::Image::solarize ( const double factor_ ) { + ExceptionInfo exceptionInfo; + GetExceptionInfo( &exceptionInfo ); modifyImage(); - SolarizeImage ( image(), factor_ ); - throwImageException(); + SolarizeImage ( image(), factor_, &exceptionInfo ); + throwException( exceptionInfo ); + (void) DestroyExceptionInfo( &exceptionInfo ); } // Sparse color image, given a set of coordinates, interpolates the colors @@ -3096,8 +3105,12 @@ void Magick::Image::fontTypeMetrics( const std::string &text_, { DrawInfo *drawInfo = options()->drawInfo(); drawInfo->text = const_cast(text_.c_str()); - GetTypeMetrics( image(), drawInfo, &(metrics->_typeMetric) ); + ExceptionInfo exceptionInfo; + GetExceptionInfo( &exceptionInfo ); + GetTypeMetrics( image(), drawInfo, &(metrics->_typeMetric), &exceptionInfo ); drawInfo->text = 0; + throwException( exceptionInfo ); + (void) DestroyExceptionInfo( &exceptionInfo ); } // Image format string diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index 4fe8beaf1f..1dcde88e46 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -112,11 +112,14 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - RenderType(Image *,const DrawInfo *,const PointInfo *,TypeMetric *), - RenderPostscript(Image *,const DrawInfo *,const PointInfo *,TypeMetric *), + RenderType(Image *,const DrawInfo *,const PointInfo *,TypeMetric *, + ExceptionInfo *), + RenderPostscript(Image *,const DrawInfo *,const PointInfo *,TypeMetric *, + ExceptionInfo *), RenderFreetype(Image *,const DrawInfo *,const char *,const PointInfo *, - TypeMetric *), - RenderX11(Image *,const DrawInfo *,const PointInfo *,TypeMetric *); + TypeMetric *,ExceptionInfo *), + RenderX11(Image *,const DrawInfo *,const PointInfo *,TypeMetric *, + ExceptionInfo *); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -206,7 +209,8 @@ MagickExport void AnnotateComponentTerminus(void) % % The format of the AnnotateImage method is: % -% MagickBooleanType AnnotateImage(Image *image,DrawInfo *draw_info) +% MagickBooleanType AnnotateImage(Image *image,DrawInfo *draw_info, +% ExceptionInfo *exception) % % A description of each parameter follows: % @@ -214,9 +218,11 @@ MagickExport void AnnotateComponentTerminus(void) % % o draw_info: the draw info. % +% o exception: return any errors or warnings in this structure. +% */ MagickExport MagickBooleanType AnnotateImage(Image *image, - const DrawInfo *draw_info) + const DrawInfo *draw_info,ExceptionInfo *exception) { char primitive[MaxTextExtent], @@ -276,10 +282,10 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, if (annotate_info->geometry != (char *) NULL) { (void) ParsePageGeometry(image,annotate_info->geometry,&geometry, - &image->exception); + exception); (void) ParseGeometry(annotate_info->geometry,&geometry_info); } - if (SetImageStorageClass(image,DirectClass,&image->exception) == MagickFalse) + if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); status=MagickTrue; for (i=0; textlist[i] != (char *) NULL; i++) @@ -290,7 +296,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, annotate_info->affine.tx=geometry_info.xi-image->page.x; annotate_info->affine.ty=geometry_info.psi-image->page.y; (void) CloneString(&annotate->text,textlist[i]); - (void) GetTypeMetrics(image,annotate,&metrics); + (void) GetTypeMetrics(image,annotate,&metrics,exception); height=(ssize_t) (metrics.ascent-metrics.descent+ draw_info->interline_spacing+0.5); switch (annotate->gravity) @@ -479,7 +485,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, /* Annotate image with text. */ - status=RenderType(image,annotate,&offset,&metrics); + status=RenderType(image,annotate,&offset,&metrics,exception); if (status == MagickFalse) break; if (annotate->decorate == LineThroughDecoration) @@ -518,7 +524,8 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, % The format of the FormatMagickCaption method is: % % ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, -% const MagickBooleanType split,TypeMetric *metrics,char **caption) +% const MagickBooleanType split,TypeMetric *metrics,char **caption, +% ExceptionInfo *exception) % % A description of each parameter follows. % @@ -532,9 +539,12 @@ MagickExport MagickBooleanType AnnotateImage(Image *image, % % o caption: the caption. % +% o exception: return any errors or warnings in this structure. +% */ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, - const MagickBooleanType split,TypeMetric *metrics,char **caption) + const MagickBooleanType split,TypeMetric *metrics,char **caption, + ExceptionInfo *exception) { MagickBooleanType status; @@ -564,7 +574,7 @@ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, for (i=0; i < (ssize_t) GetUTFOctets(p); i++) *q++=(*(p+i)); *q='\0'; - status=GetTypeMetrics(image,draw_info,metrics); + status=GetTypeMetrics(image,draw_info,metrics,exception); if (status == MagickFalse) break; width=(size_t) floor(metrics->width+0.5); @@ -639,7 +649,7 @@ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, % The format of the GetMultilineTypeMetrics method is: % % MagickBooleanType GetMultilineTypeMetrics(Image *image, -% const DrawInfo *draw_info,TypeMetric *metrics) +% const DrawInfo *draw_info,TypeMetric *metrics,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -649,9 +659,11 @@ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, % % o metrics: Return the font metrics in this structure. % +% o exception: return any errors or warnings in this structure. +% */ MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image, - const DrawInfo *draw_info,TypeMetric *metrics) + const DrawInfo *draw_info,TypeMetric *metrics,ExceptionInfo *exception) { char **textlist; @@ -693,12 +705,12 @@ MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image, Find the widest of the text lines. */ annotate_info->text=textlist[0]; - status=GetTypeMetrics(image,annotate_info,&extent); + status=GetTypeMetrics(image,annotate_info,&extent,exception); *metrics=extent; for (i=1; textlist[i] != (char *) NULL; i++) { annotate_info->text=textlist[i]; - status=GetTypeMetrics(image,annotate_info,&extent); + status=GetTypeMetrics(image,annotate_info,&extent,exception); if (extent.width > metrics->width) *metrics=extent; } @@ -748,7 +760,7 @@ MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image, % The format of the GetTypeMetrics method is: % % MagickBooleanType GetTypeMetrics(Image *image,const DrawInfo *draw_info, -% TypeMetric *metrics) +% TypeMetric *metrics,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -758,9 +770,11 @@ MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image, % % o metrics: Return the font metrics in this structure. % +% o exception: return any errors or warnings in this structure. +% */ MagickExport MagickBooleanType GetTypeMetrics(Image *image, - const DrawInfo *draw_info,TypeMetric *metrics) + const DrawInfo *draw_info,TypeMetric *metrics,ExceptionInfo *exception) { DrawInfo *annotate_info; @@ -784,7 +798,7 @@ MagickExport MagickBooleanType GetTypeMetrics(Image *image, (void) ResetMagickMemory(metrics,0,sizeof(*metrics)); offset.x=0.0; offset.y=0.0; - status=RenderType(image,annotate_info,&offset,metrics); + status=RenderType(image,annotate_info,&offset,metrics,exception); if (image->debug != MagickFalse) (void) LogMagickEvent(AnnotateEvent,GetMagickModule(),"Metrics: text: %s; " "width: %g; height: %g; ascent: %g; descent: %g; max advance: %g; " @@ -816,7 +830,7 @@ MagickExport MagickBooleanType GetTypeMetrics(Image *image, % The format of the RenderType method is: % % MagickBooleanType RenderType(Image *image,DrawInfo *draw_info, -% const PointInfo *offset,TypeMetric *metrics) +% const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -828,9 +842,11 @@ MagickExport MagickBooleanType GetTypeMetrics(Image *image, % % o metrics: bounding box of text. % +% o exception: return any errors or warnings in this structure. +% */ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, - const PointInfo *offset,TypeMetric *metrics) + const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) { const TypeInfo *type_info; @@ -847,51 +863,52 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, if (*draw_info->font == '@') { status=RenderFreetype(image,draw_info,draw_info->encoding,offset, - metrics); + metrics,exception); return(status); } if (*draw_info->font == '-') - return(RenderX11(image,draw_info,offset,metrics)); + return(RenderX11(image,draw_info,offset,metrics,exception)); if (IsPathAccessible(draw_info->font) != MagickFalse) { status=RenderFreetype(image,draw_info,draw_info->encoding,offset, - metrics); + metrics,exception); return(status); } - type_info=GetTypeInfo(draw_info->font,&image->exception); + type_info=GetTypeInfo(draw_info->font,exception); if (type_info == (const TypeInfo *) NULL) - (void) ThrowMagickException(&image->exception,GetMagickModule(), - TypeWarning,"UnableToReadFont","`%s'",draw_info->font); + (void) ThrowMagickException(exception,GetMagickModule(),TypeWarning, + "UnableToReadFont","`%s'",draw_info->font); } if ((type_info == (const TypeInfo *) NULL) && (draw_info->family != (const char *) NULL)) { type_info=GetTypeInfoByFamily(draw_info->family,draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) - (void) ThrowMagickException(&image->exception,GetMagickModule(), - TypeWarning,"UnableToReadFont","`%s'",draw_info->family); + (void) ThrowMagickException(exception,GetMagickModule(),TypeWarning, + "UnableToReadFont","`%s'",draw_info->family); } if (type_info == (const TypeInfo *) NULL) type_info=GetTypeInfoByFamily("Arial",draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) type_info=GetTypeInfoByFamily("Helvetica",draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) type_info=GetTypeInfoByFamily("Century Schoolbook",draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) type_info=GetTypeInfoByFamily("Sans",draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) type_info=GetTypeInfoByFamily((const char *) NULL,draw_info->style, - draw_info->stretch,draw_info->weight,&image->exception); + draw_info->stretch,draw_info->weight,exception); if (type_info == (const TypeInfo *) NULL) - type_info=GetTypeInfo("*",&image->exception); + type_info=GetTypeInfo("*",exception); if (type_info == (const TypeInfo *) NULL) { - status=RenderFreetype(image,draw_info,draw_info->encoding,offset,metrics); + status=RenderFreetype(image,draw_info,draw_info->encoding,offset,metrics, + exception); return(status); } annotate_info=CloneDrawInfo((ImageInfo *) NULL,draw_info); @@ -900,7 +917,8 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, (void) CloneString(&annotate_info->metrics,type_info->metrics); if (type_info->glyphs != (char *) NULL) (void) CloneString(&annotate_info->font,type_info->glyphs); - status=RenderFreetype(image,annotate_info,type_info->encoding,offset,metrics); + status=RenderFreetype(image,annotate_info,type_info->encoding,offset,metrics, + exception); annotate_info=DestroyDrawInfo(annotate_info); return(status); } @@ -922,7 +940,8 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, % The format of the RenderFreetype method is: % % MagickBooleanType RenderFreetype(Image *image,DrawInfo *draw_info, -% const char *encoding,const PointInfo *offset,TypeMetric *metrics) +% const char *encoding,const PointInfo *offset,TypeMetric *metrics, +% ExceptionInfo *exception) % % A description of each parameter follows: % @@ -936,6 +955,8 @@ static MagickBooleanType RenderType(Image *image,const DrawInfo *draw_info, % % o metrics: bounding box of text. % +% o exception: return any errors or warnings in this structure. +% */ #if defined(MAGICKCORE_FREETYPE_DELEGATE) @@ -1006,7 +1027,8 @@ static int TraceQuadraticBezier(FT_Vector *control,FT_Vector *to, } static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, - const char *encoding,const PointInfo *offset,TypeMetric *metrics) + const char *encoding,const PointInfo *offset,TypeMetric *metrics, + ExceptionInfo *exception) { #if !defined(FT_OPEN_PATHNAME) #define FT_OPEN_PATHNAME ft_open_pathname @@ -1112,9 +1134,9 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, if (status != 0) { (void) FT_Done_FreeType(library); - (void) ThrowMagickException(&image->exception,GetMagickModule(), - TypeError,"UnableToReadFont","`%s'",draw_info->font); - return(RenderPostscript(image,draw_info,offset,metrics)); + (void) ThrowMagickException(exception,GetMagickModule(),TypeError, + "UnableToReadFont","`%s'",draw_info->font); + return(RenderPostscript(image,draw_info,offset,metrics,exception)); } if ((draw_info->metrics != (char *) NULL) && (IsPathAccessible(draw_info->metrics) != MagickFalse)) @@ -1240,9 +1262,9 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, if (draw_info->render != MagickFalse) { if (image->storage_class != DirectClass) - (void) SetImageStorageClass(image,DirectClass,&image->exception); + (void) SetImageStorageClass(image,DirectClass,exception); if (image->matte == MagickFalse) - (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,&image->exception); + (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); } direction=1.0; if (draw_info->direction == RightToLeftDirection) @@ -1330,9 +1352,6 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, CacheView *image_view; - ExceptionInfo - *exception; - MagickBooleanType status; @@ -1340,7 +1359,6 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, Rasterize the glyph. */ status=MagickTrue; - exception=(&image->exception); image_view=AcquireCacheView(image); for (y=0; y < (ssize_t) bitmap->bitmap.rows; y++) { @@ -1502,9 +1520,9 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, #else static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, const char *magick_unused(encoding),const PointInfo *offset, - TypeMetric *metrics) + TypeMetric *metrics,ExceptionInfo *exception) { - (void) ThrowMagickException(&image->exception,GetMagickModule(), + (void) ThrowMagickException(exception,GetMagickModule(), MissingDelegateWarning,"DelegateLibrarySupportNotBuiltIn","`%s' (Freetype)", draw_info->font != (char *) NULL ? draw_info->font : "none"); return(RenderPostscript(image,draw_info,offset,metrics)); @@ -1528,7 +1546,7 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, % The format of the RenderPostscript method is: % % MagickBooleanType RenderPostscript(Image *image,DrawInfo *draw_info, -% const PointInfo *offset,TypeMetric *metrics) +% const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -1540,6 +1558,8 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info, % % o metrics: bounding box of text. % +% o exception: return any errors or warnings in this structure. +% */ static inline size_t MagickMin(const size_t x,const size_t y) @@ -1580,7 +1600,8 @@ static char *EscapeParenthesis(const char *text) } static MagickBooleanType RenderPostscript(Image *image, - const DrawInfo *draw_info,const PointInfo *offset,TypeMetric *metrics) + const DrawInfo *draw_info,const PointInfo *offset,TypeMetric *metrics, + ExceptionInfo *exception) { char filename[MaxTextExtent], @@ -1626,8 +1647,7 @@ static MagickBooleanType RenderPostscript(Image *image, file=fdopen(unique_file,"wb"); if ((unique_file == -1) || (file == (FILE *) NULL)) { - ThrowFileException(&image->exception,FileOpenError,"UnableToOpenFile", - filename); + ThrowFileException(exception,FileOpenError,"UnableToOpenFile",filename); return(MagickFalse); } (void) FormatLocaleFile(file,"%%!PS-Adobe-3.0\n"); @@ -1690,8 +1710,8 @@ static MagickBooleanType RenderPostscript(Image *image, if (draw_info->density != (char *) NULL) (void) CloneString(&annotate_info->density,draw_info->density); annotate_info->antialias=draw_info->text_antialias; - annotate_image=ReadImage(annotate_info,&image->exception); - CatchException(&image->exception); + annotate_image=ReadImage(annotate_info,exception); + CatchException(exception); annotate_info=DestroyImageInfo(annotate_info); (void) RelinquishUniqueFileResource(filename); if (annotate_image == (Image *) NULL) @@ -1719,7 +1739,7 @@ static MagickBooleanType RenderPostscript(Image *image, RectangleInfo crop_info; - crop_info=GetImageBoundingBox(annotate_image,&annotate_image->exception); + crop_info=GetImageBoundingBox(annotate_image,exception); crop_info.height=(size_t) ((resolution.y/DefaultResolution)* ExpandAffine(&draw_info->affine)*draw_info->pointsize+0.5); crop_info.y=(ssize_t) ceil((resolution.y/DefaultResolution)*extent.y/8.0- @@ -1751,9 +1771,6 @@ static MagickBooleanType RenderPostscript(Image *image, } if (draw_info->fill.alpha != TransparentAlpha) { - ExceptionInfo - *exception; - MagickBooleanType sync; @@ -1766,7 +1783,6 @@ static MagickBooleanType RenderPostscript(Image *image, /* Render fill color. */ - exception=(&image->exception); if (image->matte == MagickFalse) (void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception); if (annotate_image->matte == MagickFalse) @@ -1827,7 +1843,7 @@ static MagickBooleanType RenderPostscript(Image *image, % The format of the RenderX11 method is: % % MagickBooleanType RenderX11(Image *image,DrawInfo *draw_info, -% const PointInfo *offset,TypeMetric *metrics) +% const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -1839,10 +1855,12 @@ static MagickBooleanType RenderPostscript(Image *image, % % o metrics: bounding box of text. % +% o exception: return any errors or warnings in this structure. +% */ #if defined(MAGICKCORE_X11_DELEGATE) static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info, - const PointInfo *offset,TypeMetric *metrics) + const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) { MagickBooleanType status; @@ -2039,12 +2057,12 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info, } #else static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info, - const PointInfo *offset,TypeMetric *metrics) + const PointInfo *offset,TypeMetric *metrics,ExceptionInfo *exception) { (void) draw_info; (void) offset; (void) metrics; - (void) ThrowMagickException(&image->exception,GetMagickModule(), + (void) ThrowMagickException(exception,GetMagickModule(), MissingDelegateError,"DelegateLibrarySupportNotBuiltIn","`%s' (X11)", image->filename); return(MagickFalse); diff --git a/MagickCore/annotate.h b/MagickCore/annotate.h index 14df56ab63..06957deef8 100644 --- a/MagickCore/annotate.h +++ b/MagickCore/annotate.h @@ -26,13 +26,14 @@ extern "C" { extern MagickExport MagickBooleanType AnnotateComponentGenesis(void), - AnnotateImage(Image *,const DrawInfo *), - GetMultilineTypeMetrics(Image *,const DrawInfo *,TypeMetric *), - GetTypeMetrics(Image *,const DrawInfo *,TypeMetric *); + AnnotateImage(Image *,const DrawInfo *,ExceptionInfo *), + GetMultilineTypeMetrics(Image *,const DrawInfo *,TypeMetric *, + ExceptionInfo *), + GetTypeMetrics(Image *,const DrawInfo *,TypeMetric *,ExceptionInfo *); extern MagickExport ssize_t FormatMagickCaption(Image *,DrawInfo *,const MagickBooleanType,TypeMetric *, - char **); + char **,ExceptionInfo *); extern MagickExport void AnnotateComponentTerminus(void); diff --git a/MagickCore/display.c b/MagickCore/display.c index 5399c4b523..f1d9f0e388 100644 --- a/MagickCore/display.c +++ b/MagickCore/display.c @@ -8517,7 +8517,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info, XSetCursorState(display,windows,MagickTrue); XCheckRefreshWindows(display,windows); threshold=SiPrefixToDouble(factor,QuantumRange); - (void) SolarizeImage(*image,threshold); + (void) SolarizeImage(*image,threshold,exception); XSetCursorState(display,windows,MagickFalse); if (windows->image.orphan != MagickFalse) break; diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 6b754ba8eb..cde1013754 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4419,7 +4419,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, (void) FormatLocaleString(geometry,MaxTextExtent,"%+f%+f", primitive_info->point.x,primitive_info->point.y); (void) CloneString(&clone_info->geometry,geometry); - status=AnnotateImage(image,clone_info); + status=AnnotateImage(image,clone_info,exception); clone_info=DestroyDrawInfo(clone_info); break; } diff --git a/MagickCore/effect.c b/MagickCore/effect.c index 7cd1a346c4..7e9ff0bc6b 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -2622,7 +2622,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview, if (preview_image == (Image *) NULL) break; (void) SolarizeImage(preview_image,(double) QuantumRange* - percentage/100.0); + percentage/100.0,exception); (void) FormatLocaleString(label,MaxTextExtent,"solarize %g", (QuantumRange*percentage)/100.0); break; diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 552062efdd..7d6954cf03 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -3511,7 +3511,7 @@ MagickExport Image *MorphImages(const Image *image, % The format of the PlasmaImage method is: % % MagickBooleanType PlasmaImage(Image *image,const SegmentInfo *segment, -% size_t attenuate,size_t depth) +% size_t attenuate,size_t depth,ExceptionInfo *exception) % % A description of each parameter follows: % @@ -3523,6 +3523,8 @@ MagickExport Image *MorphImages(const Image *image, % % o depth: Limit the plasma recursion depth. % +% o exception: return any errors or warnings in this structure. +% */ static inline Quantum PlasmaPixel(RandomInfo *random_info, @@ -3538,11 +3540,8 @@ static inline Quantum PlasmaPixel(RandomInfo *random_info, MagickExport MagickBooleanType PlasmaImageProxy(Image *image, CacheView *image_view,RandomInfo *random_info,const SegmentInfo *segment, - size_t attenuate,size_t depth) + size_t attenuate,size_t depth,ExceptionInfo *exception) { - ExceptionInfo - *exception; - MagickRealType plasma; @@ -3574,22 +3573,22 @@ MagickExport MagickBooleanType PlasmaImageProxy(Image *image, local_info.x2=(double) x_mid; local_info.y2=(double) y_mid; (void) PlasmaImageProxy(image,image_view,random_info,&local_info, - attenuate,depth); + attenuate,depth,exception); local_info=(*segment); local_info.y1=(double) y_mid; local_info.x2=(double) x_mid; (void) PlasmaImageProxy(image,image_view,random_info,&local_info, - attenuate,depth); + attenuate,depth,exception); local_info=(*segment); local_info.x1=(double) x_mid; local_info.y2=(double) y_mid; (void) PlasmaImageProxy(image,image_view,random_info,&local_info, - attenuate,depth); + attenuate,depth,exception); local_info=(*segment); local_info.x1=(double) x_mid; local_info.y1=(double) y_mid; return(PlasmaImageProxy(image,image_view,random_info,&local_info, - attenuate,depth)); + attenuate,depth,exception)); } x_mid=(ssize_t) ceil((segment->x1+segment->x2)/2-0.5); y_mid=(ssize_t) ceil((segment->y1+segment->y2)/2-0.5); @@ -3599,7 +3598,6 @@ MagickExport MagickBooleanType PlasmaImageProxy(Image *image, /* Average pixels and apply plasma. */ - exception=(&image->exception); plasma=(MagickRealType) QuantumRange/(2.0*attenuate); if ((segment->x1 != (double) x_mid) || (segment->x2 != (double) x_mid)) { @@ -3728,7 +3726,8 @@ MagickExport MagickBooleanType PlasmaImageProxy(Image *image, } MagickExport MagickBooleanType PlasmaImage(Image *image, - const SegmentInfo *segment,size_t attenuate,size_t depth) + const SegmentInfo *segment,size_t attenuate,size_t depth, + ExceptionInfo *exception) { CacheView *image_view; @@ -3745,11 +3744,12 @@ MagickExport MagickBooleanType PlasmaImage(Image *image, assert(image->signature == MagickSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); - if (SetImageStorageClass(image,DirectClass,&image->exception) == MagickFalse) + if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse) return(MagickFalse); image_view=AcquireCacheView(image); random_info=AcquireRandomInfo(); - status=PlasmaImageProxy(image,image_view,random_info,segment,attenuate,depth); + status=PlasmaImageProxy(image,image_view,random_info,segment,attenuate,depth, + exception); random_info=DestroyRandomInfo(random_info); image_view=DestroyCacheView(image_view); return(status); @@ -3848,7 +3848,7 @@ MagickExport Image *PolaroidImage(const Image *image,const DrawInfo *draw_info, value); (void) CloneString(&annotate_info->text,caption); count=FormatMagickCaption(caption_image,annotate_info,MagickTrue,&metrics, - &caption); + &caption,exception); status=SetImageExtent(caption_image,image->columns,(size_t) ((count+1)*(metrics.ascent-metrics.descent)+0.5),exception); if (status == MagickFalse) @@ -3863,7 +3863,7 @@ MagickExport Image *PolaroidImage(const Image *image,const DrawInfo *draw_info, if (annotate_info->gravity == UndefinedGravity) (void) CloneString(&annotate_info->geometry,AcquireString( geometry)); - (void) AnnotateImage(caption_image,annotate_info); + (void) AnnotateImage(caption_image,annotate_info,exception); height+=caption_image->rows; } annotate_info=DestroyDrawInfo(annotate_info); @@ -4411,7 +4411,8 @@ MagickExport Image *SketchImage(const Image *image,const double radius, % % The format of the SolarizeImage method is: % -% MagickBooleanType SolarizeImage(Image *image,const double threshold) +% MagickBooleanType SolarizeImage(Image *image,const double threshold, +% ExceptionInfo *exception) % % A description of each parameter follows: % @@ -4419,18 +4420,17 @@ MagickExport Image *SketchImage(const Image *image,const double radius, % % o threshold: Define the extent of the solarization. % +% o exception: return any errors or warnings in this structure. +% */ MagickExport MagickBooleanType SolarizeImage(Image *image, - const double threshold) + const double threshold,ExceptionInfo *exception) { #define SolarizeImageTag "Solarize/Image" CacheView *image_view; - ExceptionInfo - *exception; - MagickBooleanType status; @@ -4469,7 +4469,6 @@ MagickExport MagickBooleanType SolarizeImage(Image *image, */ status=MagickTrue; progress=0; - exception=(&image->exception); image_view=AcquireCacheView(image); #if defined(MAGICKCORE_OPENMP_SUPPORT) #pragma omp parallel for schedule(dynamic,4) shared(progress,status) @@ -4484,8 +4483,7 @@ MagickExport MagickBooleanType SolarizeImage(Image *image, if (status == MagickFalse) continue; - q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1, - exception); + q=GetCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception); if (q == (const Quantum *) NULL) { status=MagickFalse; diff --git a/MagickCore/fx.h b/MagickCore/fx.h index 9f978582c9..bf99249f5a 100644 --- a/MagickCore/fx.h +++ b/MagickCore/fx.h @@ -62,8 +62,8 @@ extern MagickExport Image *WaveImage(const Image *,const double,const double,ExceptionInfo *); extern MagickExport MagickBooleanType - PlasmaImage(Image *,const SegmentInfo *,size_t,size_t), - SolarizeImage(Image *,const double); + PlasmaImage(Image *,const SegmentInfo *,size_t,size_t,ExceptionInfo *), + SolarizeImage(Image *,const double,ExceptionInfo *); #if defined(__cplusplus) || defined(c_plusplus) } diff --git a/MagickCore/montage.c b/MagickCore/montage.c index ce2837452a..af46c4a82d 100644 --- a/MagickCore/montage.c +++ b/MagickCore/montage.c @@ -548,7 +548,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, draw_info->stroke=montage_info->stroke; draw_info->fill=montage_info->fill; draw_info->text=AcquireString(""); - (void) GetTypeMetrics(image_list[0],draw_info,&metrics); + (void) GetTypeMetrics(image_list[0],draw_info,&metrics,exception); texture=NewImageList(); if (montage_info->texture != (char *) NULL) { @@ -696,13 +696,13 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, clone_info=CloneDrawInfo(image_info,draw_info); clone_info->gravity=CenterGravity; clone_info->pointsize*=2.0; - (void) GetTypeMetrics(image_list[0],clone_info,&metrics); + (void) GetTypeMetrics(image_list[0],clone_info,&metrics,exception); (void) FormatLocaleString(geometry,MaxTextExtent, "%.20gx%.20g%+.20g%+.20g",(double) montage->columns,(double) (metrics.ascent-metrics.descent),0.0,(double) extract_info.y+4); (void) CloneString(&clone_info->geometry,geometry); (void) CloneString(&clone_info->text,title); - (void) AnnotateImage(montage,clone_info); + (void) AnnotateImage(montage,clone_info,exception); clone_info=DestroyDrawInfo(clone_info); } (void) SetImageProgressMonitor(montage,progress_monitor, @@ -848,7 +848,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, (montage_info->shadow != MagickFalse ? 4 : 0))+bevel_width)); (void) CloneString(&draw_info->geometry,geometry); (void) CloneString(&draw_info->text,value); - (void) AnnotateImage(montage,draw_info); + (void) AnnotateImage(montage,draw_info,exception); } } x_offset+=(ssize_t) (width+2*(extract_info.x+border_width)); diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 2ac924f2ac..4fe769a492 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -603,10 +603,8 @@ WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand, draw_info->affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0)))); draw_info->affine.sy=cos(DegreesToRadians(fmod(angle,360.0))); (void) CloneString(&draw_info->geometry,geometry); - status=AnnotateImage(wand->images,draw_info); + status=AnnotateImage(wand->images,draw_info,&wand->images->exception); draw_info=DestroyDrawInfo(draw_info); - if (status == MagickFalse) - InheritException(wand->exception,&wand->images->exception); return(status); } @@ -10630,9 +10628,7 @@ WandExport MagickBooleanType MagickSolarizeImage(MagickWand *wand, (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); if (wand->images == (Image *) NULL) ThrowWandException(WandError,"ContainsNoImages",wand->name); - status=SolarizeImage(wand->images,threshold); - if (status == MagickFalse) - InheritException(wand->exception,&wand->images->exception); + status=SolarizeImage(wand->images,threshold,&wand->images->exception); return(status); } diff --git a/MagickWand/magick-wand.c b/MagickWand/magick-wand.c index 0b125e8757..af10560843 100644 --- a/MagickWand/magick-wand.c +++ b/MagickWand/magick-wand.c @@ -553,11 +553,11 @@ WandExport double *MagickQueryFontMetrics(MagickWand *wand, } (void) CloneString(&draw_info->text,text); (void) ResetMagickMemory(&metrics,0,sizeof(metrics)); - status=GetTypeMetrics(wand->images,draw_info,&metrics); + status=GetTypeMetrics(wand->images,draw_info,&metrics, + &wand->images->exception); draw_info=DestroyDrawInfo(draw_info); if (status == MagickFalse) { - InheritException(wand->exception,&wand->images->exception); font_metrics=(double *) RelinquishMagickMemory(font_metrics); return((double *) NULL); } @@ -661,11 +661,11 @@ WandExport double *MagickQueryMultilineFontMetrics(MagickWand *wand, } (void) CloneString(&draw_info->text,text); (void) ResetMagickMemory(&metrics,0,sizeof(metrics)); - status=GetMultilineTypeMetrics(wand->images,draw_info,&metrics); + status=GetMultilineTypeMetrics(wand->images,draw_info,&metrics, + &wand->images->exception); draw_info=DestroyDrawInfo(draw_info); if (status == MagickFalse) { - InheritException(wand->exception,&wand->images->exception); font_metrics=(double *) RelinquishMagickMemory(font_metrics); return((double *) NULL); } diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c index d2774f4f62..a70f5bb7cf 100644 --- a/MagickWand/mogrify.c +++ b/MagickWand/mogrify.c @@ -789,8 +789,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, fmod(geometry_info.sigma,360.0)))); draw_info->affine.sy=cos(DegreesToRadians( fmod(geometry_info.sigma,360.0))); - (void) AnnotateImage(*image,draw_info); - InheritException(exception,&(*image)->exception); + (void) AnnotateImage(*image,draw_info,exception); break; } if (LocaleCompare("antialias",option+1) == 0) @@ -2738,8 +2737,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc, (void) SyncImageSettings(mogrify_info,*image); threshold=SiPrefixToDouble(argv[i+1],QuantumRange); - (void) SolarizeImage(*image,threshold); - InheritException(exception,&(*image)->exception); + (void) SolarizeImage(*image,threshold,exception); break; } if (LocaleCompare("sparse-color",option+1) == 0) diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index 7aea07bdb6..7bfb67430d 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -8129,7 +8129,7 @@ Mogrify(ref,...) if (attribute_flag[32] != 0) draw_info->direction=(DirectionType) argument_list[32].integer_reference; - (void) AnnotateImage(image,draw_info); + (void) AnnotateImage(image,draw_info,exception); draw_info=DestroyDrawInfo(draw_info); break; } @@ -8934,9 +8934,9 @@ Mogrify(ref,...) flags=ParseGeometry(argument_list[0].string_reference, &geometry_info); if (attribute_flag[1] != 0) - geometry_info.rho=SiPrefixToDouble(argument_list[1].string_reference, - QuantumRange); - (void) SolarizeImage(image,geometry_info.rho); + geometry_info.rho=SiPrefixToDouble( + argument_list[1].string_reference,QuantumRange); + (void) SolarizeImage(image,geometry_info.rho,exception); break; } case 53: /* Sync */ @@ -12318,7 +12318,7 @@ QueryFontMetrics(ref,...) (void) FormatLocaleString(draw_info->geometry,MaxTextExtent, "%.15g,%.15g",x,y); } - status=GetTypeMetrics(image,draw_info,&metrics); + status=GetTypeMetrics(image,draw_info,&metrics,exception); (void) CatchImageException(image); if (status == MagickFalse) PUSHs(&sv_undef); @@ -12691,8 +12691,8 @@ QueryMultilineFontMetrics(ref,...) (void) FormatLocaleString(draw_info->geometry,MaxTextExtent, "%.15g,%.15g",x,y); } - status=GetMultilineTypeMetrics(image,draw_info,&metrics); - (void) CatchImageException(image); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); + (void) CatchException(exception); if (status == MagickFalse) PUSHs(&sv_undef); else diff --git a/PerlMagick/t/Generic.ttf b/PerlMagick/t/Generic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8ea647090f75e7d34bee4c511921299d1f3c1055 GIT binary patch literal 18444 zcmdUXd0bOh+VDB&-Xts`ke#q51QK?E5W>ERfQSl+h=|C(DElJfjvFe)UBnHoT5GLi zZL8L?*3q_BtyQ}@*6G;I>Eg80nd!70$C8`xIX7sn?Y!^z`+a|X(R=T?&)J{z?B`q% zMhLmVjYTLkvvA_L{ClMcW&H!7URfFAGEoq^0y%l`?vs@_dCI3J{=OaFHz0(|vZhQ; zZ`|0q9^P9aUpslqn5d%;SLQ(8YIrZIYN}{`BV^xK(D?TVk@Tv$om!+LJqU?nA)l?Q z=xDXs5CiqI;oYIGv8Q(3yQg6=4wn#$e!sq^qWY`nUQdVi#E>6T4*-{I>sG;g2E6;% zH+9bIem!R`ynliaqiAfYs`$f=s|C=0BEX(#s+iY`W#|l~>!G~1xuU6NO!eD$5lY&H zknl=tOGjr-_A4JFlmYqpHlnz|n(dCl=$B@>CjNk&9RPsP`5(r-``~F?!=(tlMVH~- z0TBv?AJh|F=2Fm1*IwJ2rAX+_w`9+=-!Jfx3#bwaP$A%&*2Fw46;cFnfSFnNd&s3f z@&~~8jze2NIOl+Hg!{R@0CE;GLOMRQ6s8J~2YsWw+HuwJuGJn9CUHr0B=|hM(JKg@SF?ReAFYD0`Esr4?cr-u$|EMO@Qa49-#+3{|)(ORLV|( zX9+wf0?dNK*bkxqe?s~;$`b~nLiQ}mfwpr6VW^t4qvcG9?GAx?F?-NTm}47%Ljj2BKbk6fMW^+tx70`1GK_3UdQE>w{`(J=PtKCrA1E z<>VB=0?|Acp#nh}%3xL^Gks@XMJ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7s(9&^ELhy@ozQhtWRtJ9HUc z1pmGgB;^J`{S`pxCHT7UI(iFTMc2?>K;3)jZS)R$4p90Jh@AWpy^n4H&3=vkhSs3j zfa*Db^hQ{?y+B57pm``^b-^Oc1v&axG!Mbw)<6s3{MJISzn_G^XRsJ8g%dE}pl{J> z%%B(0i|8bJ3B8V4@K;Zu3s``KP8}_^o%KDf^)<~-wGDM$?KRaE9rZ44T`iq8?NpX^ z)KrVQnj4}bA~V@>UG0>r=<0!eMR=f<8!I}S z!P}#G)RwdV?D;;Rc^=QFIe1P@JFP=$ggm%IA`A1;Br_j6T1Hk`Z06YJHS|ZzJxXWy9un%Og9YYq|FnqBSf~MO_;p@|V zkY@(HiUEEG?oqbQFe`s3W3jD=cYj+q|Gp7UZBnbp-zG+Zw$muvc9w_lh1BPKDjj9m z=*f;0=m|sXE8#xPb_GskWI(U^(0YOGCO}R@OGhD=brbR@!b;M69^7X@Sx94Qmt{Ya ztAZ9}@HZg>;T%;s|Mwp(5P6IT9HfBmwf~KWiNKtext,text); text=DestroyString(text); (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", -metrics.bounds.x1,metrics.ascent); if (draw_info->gravity == UndefinedGravity) (void) CloneString(&draw_info->geometry,geometry); - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); (void) status; width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5); @@ -173,14 +174,15 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, for ( ; ; ) { text=AcquireString(caption); - i=FormatMagickCaption(image,draw_info,MagickFalse,&metrics,&text); + i=FormatMagickCaption(image,draw_info,MagickFalse,&metrics,&text, + exception); (void) CloneString(&draw_info->text,text); text=DestroyString(text); (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", -metrics.bounds.x1,metrics.ascent); if (draw_info->gravity == UndefinedGravity) (void) CloneString(&draw_info->geometry,geometry); - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5); if ((width > (image->columns+1)) || (height > (image->rows+1))) @@ -189,7 +191,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, } draw_info->pointsize--; } - i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&caption); + i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&caption,exception); if (image->rows == 0) image->rows=(size_t) ((i+1)*(metrics.ascent-metrics.descent+ draw_info->interline_spacing+draw_info->stroke_width)+0.5); @@ -206,7 +208,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, Draw caption. */ (void) CloneString(&draw_info->text,caption); - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); if ((draw_info->gravity != UndefinedGravity) && (draw_info->direction != RightToLeftDirection)) image->page.x=(ssize_t) (metrics.bounds.x1-draw_info->stroke_width/2.0); @@ -221,7 +223,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, metrics.ascent+draw_info->stroke_width/2.0); draw_info->geometry=AcquireString(geometry); } - (void) AnnotateImage(image,draw_info); + (void) AnnotateImage(image,draw_info,exception); draw_info=DestroyDrawInfo(draw_info); caption=DestroyString(caption); return(GetFirstImageInList(image)); diff --git a/coders/label.c b/coders/label.c index 2a746a4374..5c73428d90 100644 --- a/coders/label.c +++ b/coders/label.c @@ -135,7 +135,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, /* Fit label to canvas size. */ - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); for ( ; status != MagickFalse; draw_info->pointsize*=2.0) { width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); @@ -143,7 +143,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, if (((image->columns != 0) && (width >= image->columns)) || ((image->rows != 0) && (height >= image->rows))) break; - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); } draw_info->pointsize/=2.0; for ( ; status != MagickFalse; draw_info->pointsize--) @@ -158,10 +158,10 @@ static Image *ReadLABELImage(const ImageInfo *image_info, break; if (draw_info->pointsize < 2.0) break; - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); } } - status=GetMultilineTypeMetrics(image,draw_info,&metrics); + status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); if (status == MagickFalse) { InheritException(exception,&image->exception); @@ -195,7 +195,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, image=DestroyImageList(image); return((Image *) NULL); } - (void) AnnotateImage(image,draw_info); + (void) AnnotateImage(image,draw_info,exception); if (image_info->pointsize == 0.0) { char diff --git a/coders/msl.c b/coders/msl.c index 3441e36199..eee2b45547 100644 --- a/coders/msl.c +++ b/coders/msl.c @@ -1079,7 +1079,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, affine.tx; draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+ affine.ty; - (void) AnnotateImage(msl_info->image[n],draw_info); + (void) AnnotateImage(msl_info->image[n],draw_info, + &msl_info->image[n]->exception); draw_info=DestroyDrawInfo(draw_info); break; } @@ -4816,7 +4817,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, affine.tx; draw_info->affine.ty=affine.rx*current.tx+affine.sy*current.ty+ affine.ty; - status=GetTypeMetrics(msl_info->attributes[n],draw_info,&metrics); + status=GetTypeMetrics(msl_info->attributes[n],draw_info,&metrics, + &msl_info->image[n]->exception); if (status != MagickFalse) { Image @@ -6618,7 +6620,8 @@ static void MSLStartElement(void *context,const xmlChar *tag, } } } - (void) SolarizeImage(msl_info->image[n],geometry_info.rho); + (void) SolarizeImage(msl_info->image[n],geometry_info.rho, + &msl_info->image[n]->exception); break; } if (LocaleCompare((const char *) tag,"spread") == 0) diff --git a/coders/plasma.c b/coders/plasma.c index 1f5cb4a986..61ac232183 100644 --- a/coders/plasma.c +++ b/coders/plasma.c @@ -214,7 +214,7 @@ static Image *ReadPlasmaImage(const ImageInfo *image_info, i>>=1; for (depth=1; ; depth++) { - if (PlasmaImage(image,&segment_info,0,depth) != MagickFalse) + if (PlasmaImage(image,&segment_info,0,depth,exception) != MagickFalse) break; status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) depth, max_depth); diff --git a/coders/svg.c b/coders/svg.c index d38a8650e2..8a542056a6 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -1116,7 +1116,8 @@ static void SVGStartElement(void *context,const xmlChar *name, draw_info->pointsize=svg_info->pointsize; draw_info->text=AcquireString(svg_info->text); (void) ConcatenateString(&draw_info->text," "); - GetTypeMetrics(svg_info->image,draw_info,&metrics); + (void) GetTypeMetrics(svg_info->image,draw_info, + &metrics,svg_info->exception); svg_info->bounds.x+=metrics.width; draw_info=DestroyDrawInfo(draw_info); *svg_info->text='\0'; @@ -2431,7 +2432,8 @@ static void SVGEndElement(void *context,const xmlChar *name) draw_info->pointsize=svg_info->pointsize; draw_info->text=AcquireString(svg_info->text); (void) ConcatenateString(&draw_info->text," "); - GetTypeMetrics(svg_info->image,draw_info,&metrics); + (void) GetTypeMetrics(svg_info->image,draw_info,&metrics, + svg_info->exception); svg_info->bounds.x+=metrics.width; draw_info=DestroyDrawInfo(draw_info); *svg_info->text='\0'; diff --git a/coders/txt.c b/coders/txt.c index b44f505663..e7e4b8e8e2 100644 --- a/coders/txt.c +++ b/coders/txt.c @@ -251,7 +251,7 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image, (void) FormatLocaleString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x, (long) page.y); (void) CloneString(&draw_info->geometry,geometry); - status=GetTypeMetrics(image,draw_info,&metrics); + status=GetTypeMetrics(image,draw_info,&metrics,exception); if (status == MagickFalse) ThrowReaderException(TypeError,"UnableToGetTypeMetrics"); page.y=(ssize_t) ceil((double) page.y+metrics.ascent-0.5); @@ -290,7 +290,7 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image, (void) SetImageProgressMonitor(image,progress_monitor, image->client_data); } - (void) AnnotateImage(image,draw_info); + (void) AnnotateImage(image,draw_info,exception); if (p == (char *) NULL) break; /* @@ -324,7 +324,7 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image, (void) TextureImage(image,texture); (void) SetImageProgressMonitor(image,progress_monitor,image->client_data); } - (void) AnnotateImage(image,draw_info); + (void) AnnotateImage(image,draw_info,exception); if (texture != (Image *) NULL) texture=DestroyImage(texture); draw_info=DestroyDrawInfo(draw_info);