pixel.pen_color.red=ScaleQuantumToShort(draw_info->fill.red);
pixel.pen_color.green=ScaleQuantumToShort(draw_info->fill.green);
pixel.pen_color.blue=ScaleQuantumToShort(draw_info->fill.blue);
- status=XAnnotateImage(display,&pixel,&annotate_info,image);
+ status=XAnnotateImage(display,&pixel,&annotate_info,image,exception);
if (status == 0)
{
ThrowXWindowException(ResourceLimitError,"MemoryAllocationFailed",
/*
Annotate image with text.
*/
- status=XAnnotateImage(display,windows->pixel_info,annotate_info,image);
+ status=XAnnotateImage(display,windows->pixel_info,annotate_info,image,
+ exception);
if (status == 0)
return(MagickFalse);
/*
{
if (image->colorspace == CMYKColorspace)
(void) FormatLocaleFile(file," Total ink density: %.0f%%\n",100.0*
- GetImageTotalInkDensity(image)/(double) QuantumRange);
+ GetImageTotalInkDensity(image,exception)/(double) QuantumRange);
x=0;
if (image->matte != MagickFalse)
{
ImageView *source,ImageView *duplex,ImageView *destination,
DuplexTransferImageViewMethod transfer,void *context)
{
- ExceptionInfo
- *exception;
-
Image
*destination_image,
*source_image;
return(MagickFalse);
source_image=source->image;
destination_image=destination->image;
- exception=destination->exception;
- if (SetImageStorageClass(destination_image,DirectClass,exception) == MagickFalse)
+ status=SetImageStorageClass(destination_image,DirectClass,
+ destination->exception);
+ if (status == MagickFalse)
return(MagickFalse);
status=MagickTrue;
progress=0;
continue;
}
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
- destination->extent.x,y,destination->extent.width,1,exception);
+ destination->extent.x,y,destination->extent.width,1,
+ destination->exception);
if (destination_pixels == (Quantum *) NULL)
{
status=MagickFalse;
}
if (transfer(source,duplex,destination,y,id,context) == MagickFalse)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ sync=SyncCacheViewAuthenticPixels(destination->view,destination->exception);
if (sync == MagickFalse)
- {
- InheritException(destination->exception,GetCacheViewException(
- source->view));
- status=MagickFalse;
- }
+ status=MagickFalse;
if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
% %
% %
% %
-% G e t I m a g e V i e w A u t h e n t i c M e t a c o n t e n t %
+% G e t I m a g e V i e w A u t h e n t i c M e t a c o n t e n t %
% %
% %
% %
MagickExport MagickBooleanType SetImageViewIterator(ImageView *destination,
SetImageViewMethod set,void *context)
{
- ExceptionInfo
- *exception;
-
Image
*destination_image;
if (set == (SetImageViewMethod) NULL)
return(MagickFalse);
destination_image=destination->image;
- exception=destination->exception;
- if (SetImageStorageClass(destination_image,DirectClass,exception) == MagickFalse)
+ status=SetImageStorageClass(destination_image,DirectClass,
+ destination->exception);
+ if (status == MagickFalse)
return(MagickFalse);
status=MagickTrue;
progress=0;
if (status == MagickFalse)
continue;
pixels=GetCacheViewAuthenticPixels(destination->view,destination->extent.x,
- y,destination->extent.width,1,exception);
+ y,destination->extent.width,1,destination->exception);
if (pixels == (Quantum *) NULL)
{
- InheritException(destination->exception,GetCacheViewException(
- destination->view));
status=MagickFalse;
continue;
}
if (set(destination,y,id,context) == MagickFalse)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ sync=SyncCacheViewAuthenticPixels(destination->view,destination->exception);
if (sync == MagickFalse)
- {
- InheritException(destination->exception,GetCacheViewException(
- destination->view));
- status=MagickFalse;
- }
+ status=MagickFalse;
if (destination_image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
MagickExport MagickBooleanType TransferImageViewIterator(ImageView *source,
ImageView *destination,TransferImageViewMethod transfer,void *context)
{
- ExceptionInfo
- *exception;
-
Image
*destination_image,
*source_image;
return(MagickFalse);
source_image=source->image;
destination_image=destination->image;
- exception=destination->exception;
- if (SetImageStorageClass(destination_image,DirectClass,exception) == MagickFalse)
+ status=SetImageStorageClass(destination_image,DirectClass,
+ destination->exception);
+ if (status == MagickFalse)
return(MagickFalse);
status=MagickTrue;
progress=0;
continue;
}
destination_pixels=GetCacheViewAuthenticPixels(destination->view,
- destination->extent.x,y,destination->extent.width,1,exception);
+ destination->extent.x,y,destination->extent.width,1,
+ destination->exception);
if (destination_pixels == (Quantum *) NULL)
{
status=MagickFalse;
}
if (transfer(source,destination,y,id,context) == MagickFalse)
status=MagickFalse;
- sync=SyncCacheViewAuthenticPixels(destination->view,exception);
+ sync=SyncCacheViewAuthenticPixels(destination->view,destination->exception);
if (sync == MagickFalse)
- {
- InheritException(destination->exception,GetCacheViewException(
- source->view));
- status=MagickFalse;
- }
+ status=MagickFalse;
if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
MagickExport MagickBooleanType UpdateImageViewIterator(ImageView *source,
UpdateImageViewMethod update,void *context)
{
- ExceptionInfo
- *exception;
-
Image
*source_image;
if (update == (UpdateImageViewMethod) NULL)
return(MagickFalse);
source_image=source->image;
- exception=source->exception;
- if (SetImageStorageClass(source_image,DirectClass,exception) == MagickFalse)
+ status=SetImageStorageClass(source_image,DirectClass,source->exception);
+ if (status == MagickFalse)
return(MagickFalse);
status=MagickTrue;
progress=0;
if (status == MagickFalse)
continue;
pixels=GetCacheViewAuthenticPixels(source->view,source->extent.x,y,
- source->extent.width,1,exception);
+ source->extent.width,1,source->exception);
if (pixels == (Quantum *) NULL)
{
- InheritException(source->exception,GetCacheViewException(source->view));
status=MagickFalse;
continue;
}
if (update(source,y,id,context) == MagickFalse)
status=MagickFalse;
- if (SyncCacheViewAuthenticPixels(source->view,exception) == MagickFalse)
- {
- InheritException(source->exception,GetCacheViewException(source->view));
- status=MagickFalse;
- }
+ status=SyncCacheViewAuthenticPixels(source->view,source->exception);
+ if (status == MagickFalse)
+ status=MagickFalse;
if (source_image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
%
% The format is:
%
-% void ClearBounds(Image *image,RectangleInfo *bounds)
+% void ClearBounds(Image *image,RectangleInfo *bounds
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
%
% o bounds: the area to be clear within the imag image
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-static void ClearBounds(Image *image,RectangleInfo *bounds)
+static void ClearBounds(Image *image,RectangleInfo *bounds,
+ ExceptionInfo *exception)
{
- ExceptionInfo
- *exception;
-
ssize_t
y;
if (bounds->x < 0)
return;
- exception=(&image->exception);
if (image->matte == MagickFalse)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel,exception);
for (y=0; y < (ssize_t) bounds->height; y++)
Clear the overlaid area of the coalesced bounds for background disposal
*/
if (next->previous->dispose == BackgroundDispose)
- ClearBounds(dispose_image, &bounds);
+ ClearBounds(dispose_image,&bounds,exception);
/*
Next image is the dispose image, overlaid with next frame in sequence.
*/
}
if ((ssize_t) (bounds.y+bounds.height) > (ssize_t) current_image->rows)
bounds.height=current_image->rows-bounds.y;
- ClearBounds(current_image,&bounds);
+ ClearBounds(current_image,&bounds,exception);
}
/*
Select the appropriate previous/disposed image.
return((Image *) NULL);
}
dup_bounds=CompareImagesBounds(dup_image,curr,CompareClearLayer,exception);
- ClearBounds(dup_image,&dup_bounds);
+ ClearBounds(dup_image,&dup_bounds,exception);
try_bounds=CompareImagesBounds(dup_image,curr,CompareAnyLayer,exception);
if ( cleared ||
dup_bounds.width*dup_bounds.height
return((Image *) NULL);
}
bgnd_bounds=bounds[i-1]; /* interum bounds of the previous image */
- ClearBounds(bgnd_image,&bgnd_bounds);
+ ClearBounds(bgnd_image,&bgnd_bounds,exception);
try_bounds=CompareImagesBounds(bgnd_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
#if DEBUG_OPT_FRAME
(double) bgnd_bounds.x,(double) bgnd_bounds.y );
#endif
}
- ClearBounds(bgnd_image,&bgnd_bounds);
+ ClearBounds(bgnd_image,&bgnd_bounds,exception);
#if DEBUG_OPT_FRAME
/* Something strange is happening with a specific animation
* CompareAnyLayers (normal method) and CompareClearLayers returns the whole
}
if ((ssize_t) (bounds.y+bounds.height) > (ssize_t) current_image->rows)
bounds.height=current_image->rows-bounds.y;
- ClearBounds(current_image, &bounds);
+ ClearBounds(current_image, &bounds,exception);
}
if (next->dispose != PreviousDispose)
{
%
% The format of the ImageToHBITMAP method is:
%
-% HBITMAP ImageToHBITMAP(Image *image)
+% HBITMAP ImageToHBITMAP(Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image: the image to convert.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-MagickExport void *ImageToHBITMAP(Image *image)
+MagickExport void *ImageToHBITMAP(Image *image,ExceptionInfo *exception)
{
BITMAP
bitmap;
- ExceptionInfo
- *exception;
-
HANDLE
bitmap_bitsH;
if (bitmap.bmBits == NULL)
bitmap.bmBits=bitmap_bits;
(void) TransformImageColorspace(image,RGBColorspace,exception);
- exception=(&image->exception);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
extern MagickExport void
*CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *),
- *ImageToHBITMAP(Image *),
+ *ImageToHBITMAP(Image *,ExceptionInfo *),
NTErrorHandler(const ExceptionType,const char *,const char *),
NTWarningHandler(const ExceptionType,const char *,const char *);
#endif
%
% The format of the GetImageTotalInkDensity method is:
%
-% double GetImageTotalInkDensity(const Image *image)
+% double GetImageTotalInkDensity(const Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-MagickExport double GetImageTotalInkDensity(Image *image)
+MagickExport double GetImageTotalInkDensity(Image *image,
+ ExceptionInfo *exception)
{
CacheView
*image_view;
double
total_ink_density;
- ExceptionInfo
- *exception;
-
MagickBooleanType
status;
}
status=MagickTrue;
total_ink_density=0.0;
- exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic,4) shared(status)
#endif
extern MagickExport double
- GetImageTotalInkDensity(Image *image);
+ GetImageTotalInkDensity(Image *image,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
/*
Do course grain classes.
*/
- exception=(&image->exception);
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic,4) shared(progress,status)
XCheckDefineCursor(Display *,Window,Cursor);
extern MagickPrivate MagickBooleanType
- XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *),
+ XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *,
+ ExceptionInfo *),
XComponentGenesis(void),
XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *),
XGetWindowColor(Display *,XWindows *,char *),
% The format of the XAnnotateImage method is:
%
% MagickBooleanType XAnnotateImage(Display *display,
-% const XPixelInfo *pixel,XAnnotateInfo *annotate_info,Image *image)
+% const XPixelInfo *pixel,XAnnotateInfo *annotate_info,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickPrivate MagickBooleanType XAnnotateImage(Display *display,
- const XPixelInfo *pixel,XAnnotateInfo *annotate_info,Image *image)
+ const XPixelInfo *pixel,XAnnotateInfo *annotate_info,Image *image,
+ ExceptionInfo *exception)
{
CacheView
*annotate_view;
GC
annotate_context;
- ExceptionInfo
- *exception;
-
Image
*annotate_image;
"ContainsNoImages","`%s'",wand->name);
return(0.0);
}
- return(GetImageTotalInkDensity(wand->images));
+ return(GetImageTotalInkDensity(wand->images,wand->exception));
}
\f
/*