This commit is contained in:
cristy
2011-08-29 00:36:28 +00:00
parent 051718b74a
commit 5cbc016eff
20 changed files with 183 additions and 152 deletions
+20 -7
View File
@@ -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<char *>(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
+85 -67
View File
@@ -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);
+5 -4
View File
@@ -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);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
+21 -23
View File
@@ -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;
+2 -2
View File
@@ -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)
}
+4 -4
View File
@@ -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));
+2 -6
View File
@@ -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);
}
+4 -4
View File
@@ -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);
}
+2 -4
View File
@@ -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)
+7 -7
View File
@@ -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
Binary file not shown.
+9 -7
View File
@@ -154,14 +154,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);
(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));
+5 -5
View File
@@ -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
+6 -3
View File
@@ -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)
+1 -1
View File
@@ -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);
+4 -2
View File
@@ -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';
+3 -3
View File
@@ -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);