diff --git a/MagickCore/display.c b/MagickCore/display.c
index 5beed0f..5399c4b 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -1561,37 +1561,49 @@
*/
static CommandType
XImageWindowCommand(Display *,XResourceInfo *,XWindows *,
- const MagickStatusType,KeySym,Image **);
+ const MagickStatusType,KeySym,Image **,ExceptionInfo *);
static Image
*XMagickCommand(Display *,XResourceInfo *,XWindows *,const CommandType,
- Image **),
+ Image **,ExceptionInfo *),
*XOpenImage(Display *,XResourceInfo *,XWindows *,const MagickBooleanType),
- *XTileImage(Display *,XResourceInfo *,XWindows *,Image *,XEvent *),
- *XVisualDirectoryImage(Display *,XResourceInfo *,XWindows *);
+ *XTileImage(Display *,XResourceInfo *,XWindows *,Image *,XEvent *,
+ ExceptionInfo *),
+ *XVisualDirectoryImage(Display *,XResourceInfo *,XWindows *,
+ ExceptionInfo *);
static MagickBooleanType
- XAnnotateEditImage(Display *,XResourceInfo *,XWindows *,Image *),
- XDrawEditImage(Display *,XResourceInfo *,XWindows *,Image **),
- XChopImage(Display *,XResourceInfo *,XWindows *,Image **),
- XCropImage(Display *,XResourceInfo *,XWindows *,Image *,const ClipboardMode),
- XBackgroundImage(Display *,XResourceInfo *,XWindows *,Image **),
- XColorEditImage(Display *,XResourceInfo *,XWindows *,Image **),
- XCompositeImage(Display *,XResourceInfo *,XWindows *,Image *),
- XConfigureImage(Display *,XResourceInfo *,XWindows *,Image *),
- XMatteEditImage(Display *,XResourceInfo *,XWindows *,Image **),
- XPasteImage(Display *,XResourceInfo *,XWindows *,Image *),
- XPrintImage(Display *,XResourceInfo *,XWindows *,Image *),
- XRotateImage(Display *,XResourceInfo *,XWindows *,double,Image **),
- XROIImage(Display *,XResourceInfo *,XWindows *,Image **),
- XSaveImage(Display *,XResourceInfo *,XWindows *,Image *),
- XTrimImage(Display *,XResourceInfo *,XWindows *,Image *);
+ XAnnotateEditImage(Display *,XResourceInfo *,XWindows *,Image *,
+ ExceptionInfo *),
+ XBackgroundImage(Display *,XResourceInfo *,XWindows *,Image **,
+ ExceptionInfo *),
+ XChopImage(Display *,XResourceInfo *,XWindows *,Image **,
+ ExceptionInfo *),
+ XCropImage(Display *,XResourceInfo *,XWindows *,Image *,const ClipboardMode,
+ ExceptionInfo *),
+ XColorEditImage(Display *,XResourceInfo *,XWindows *,Image **,
+ ExceptionInfo *),
+ XCompositeImage(Display *,XResourceInfo *,XWindows *,Image *,
+ ExceptionInfo *),
+ XConfigureImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
+ XDrawEditImage(Display *,XResourceInfo *,XWindows *,Image **,
+ ExceptionInfo *),
+ XMatteEditImage(Display *,XResourceInfo *,XWindows *,Image **,
+ ExceptionInfo *),
+ XPasteImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
+ XPrintImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
+ XRotateImage(Display *,XResourceInfo *,XWindows *,double,Image **,
+ ExceptionInfo *),
+ XROIImage(Display *,XResourceInfo *,XWindows *,Image **,ExceptionInfo *),
+ XSaveImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
+ XTrimImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *);
static void
XDrawPanRectangle(Display *,XWindows *),
- XImageCache(Display *,XResourceInfo *,XWindows *,const CommandType,Image **),
+ XImageCache(Display *,XResourceInfo *,XWindows *,const CommandType,Image **,
+ ExceptionInfo *),
XMagnifyImage(Display *,XWindows *,XEvent *),
- XMakePanImage(Display *,XResourceInfo *,XWindows *,Image *),
+ XMakePanImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
XPanImage(Display *,XWindows *,XEvent *),
XMagnifyWindowCommand(Display *,XWindows *,const MagickStatusType,
const KeySym),
@@ -1617,7 +1629,7 @@
% The format of the DisplayImages method is:
%
% MagickBooleanType DisplayImages(const ImageInfo *image_info,
-% Image *images)
+% Image *images,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -1625,9 +1637,11 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickExport MagickBooleanType DisplayImages(const ImageInfo *image_info,
- Image *images)
+ Image *images,ExceptionInfo *exception)
{
char
*argv[1];
@@ -1659,13 +1673,12 @@
display=XOpenDisplay(image_info->server_name);
if (display == (Display *) NULL)
{
- (void) ThrowMagickException(&images->exception,GetMagickModule(),
- XServerError,"UnableToOpenXServer","`%s'",XDisplayName(
- image_info->server_name));
+ (void) ThrowMagickException(exception,GetMagickModule(),XServerError,
+ "UnableToOpenXServer","`%s'",XDisplayName(image_info->server_name));
return(MagickFalse);
}
- if (images->exception.severity != UndefinedException)
- CatchException(&images->exception);
+ if (exception->severity != UndefinedException)
+ CatchException(exception);
(void) XSetErrorHandler(XError);
resource_database=XGetResourceDatabase(display,GetClientName());
(void) ResetMagickMemory(&resource_info,0,sizeof(resource_info));
@@ -1680,12 +1693,12 @@
if ((images->iterations != 0) && (i >= (ssize_t) images->iterations))
break;
image=GetImageFromList(images,i % GetImageListLength(images));
- (void) XDisplayImage(display,&resource_info,argv,1,&image,&state);
+ (void) XDisplayImage(display,&resource_info,argv,1,&image,&state,exception);
}
argv[0]=DestroyString(argv[0]);
(void) XCloseDisplay(display);
XDestroyResourceInfo(&resource_info);
- if (images->exception.severity != UndefinedException)
+ if (exception->severity != UndefinedException)
return(MagickFalse);
return(MagickTrue);
}
@@ -1762,7 +1775,8 @@
% The format of the XAnnotateEditImage method is:
%
% MagickBooleanType XAnnotateEditImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -1792,7 +1806,8 @@
}
static MagickBooleanType XAnnotateEditImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
static const char
*AnnotateMenu[] =
@@ -2732,7 +2747,7 @@
Update image configuration.
*/
XConfigureImageColormap(display,resource_info,windows,image);
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
@@ -2752,7 +2767,8 @@
% The format of the XBackgroundImage method is:
%
% MagickBooleanType XBackgroundImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image **image)
+% XResourceInfo *resource_info,XWindows *windows,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -2765,9 +2781,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XBackgroundImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
#define BackgroundImageTag "Background/Image"
@@ -2787,19 +2806,22 @@
"Enter window id (id 0x00 selects window with pointer):",window_id);
if (*window_id == '\0')
return(MagickFalse);
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XInfoWidget(display,windows,BackgroundImageTag);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
background_resources=(*resource_info);
background_resources.window_id=window_id;
background_resources.backdrop=status != 0 ? MagickTrue : MagickFalse;
- status=XDisplayBackgroundImage(display,&background_resources,*image);
+ status=XDisplayBackgroundImage(display,&background_resources,*image,
+ exception);
if (status != MagickFalse)
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_retain_colors,CurrentTime);
XSetCursorState(display,windows,MagickFalse);
- (void) XMagickCommand(display,resource_info,windows,UndoCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,UndoCommand,image,
+ exception);
return(MagickTrue);
}
@@ -2819,7 +2841,7 @@
% The format of the XChopImage method is:
%
% MagickBooleanType XChopImage(Display *display,XResourceInfo *resource_info,
-% XWindows *windows,Image **image)
+% XWindows *windows,Image **image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -2832,9 +2854,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XChopImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
static const char
*ChopMenu[] =
@@ -3183,7 +3208,8 @@
/*
Image chopping is relative to image configuration.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
windows->image.window_changes.width=windows->image.ximage->width-
@@ -3207,7 +3233,7 @@
/*
Chop image.
*/
- chop_image=ChopImage(*image,&chop_info,&(*image)->exception);
+ chop_image=ChopImage(*image,&chop_info,exception);
XSetCursorState(display,windows,MagickFalse);
if (chop_image == (Image *) NULL)
return(MagickFalse);
@@ -3217,7 +3243,7 @@
Update image configuration.
*/
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
return(MagickTrue);
}
@@ -3238,7 +3264,8 @@
% The format of the XColorEditImage method is:
%
% MagickBooleanType XColorEditImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image **image)
+% XResourceInfo *resource_info,XWindows *windows,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -3251,11 +3278,12 @@
%
% o image: the image; returned from ReadImage.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
-
-
static MagickBooleanType XColorEditImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
static const char
*ColorEditMenu[] =
@@ -3298,9 +3326,6 @@
Cursor
cursor;
- ExceptionInfo
- *exception;
-
int
entry,
id,
@@ -3527,7 +3552,7 @@
case ColorEditUndoCommand:
{
(void) XMagickCommand(display,resource_info,windows,UndoCommand,
- image);
+ image,exception);
break;
}
case ColorEditHelpCommand:
@@ -3565,7 +3590,7 @@
x=event.xbutton.x;
y=event.xbutton.y;
(void) XMagickCommand(display,resource_info,windows,
- SaveToUndoBufferCommand,image);
+ SaveToUndoBufferCommand,image,exception);
state|=UpdateConfigurationState;
break;
}
@@ -3582,7 +3607,7 @@
x=event.xbutton.x;
y=event.xbutton.y;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
XInfoWidget(display,windows,text);
(void) XCheckDefineCursor(display,windows->image.id,cursor);
state&=(~UpdateConfigurationState);
@@ -3698,7 +3723,6 @@
if ((x_offset >= (int) (*image)->columns) ||
(y_offset >= (int) (*image)->rows))
continue;
- exception=(&(*image)->exception);
image_view=AcquireCacheView(*image);
switch (method)
{
@@ -3717,8 +3741,7 @@
SetPixelRed(*image,ScaleShortToQuantum(color.red),q);
SetPixelGreen(*image,ScaleShortToQuantum(color.green),q);
SetPixelBlue(*image,ScaleShortToQuantum(color.blue),q);
- (void) SyncCacheViewAuthenticPixels(image_view,
- &(*image)->exception);
+ (void) SyncCacheViewAuthenticPixels(image_view,exception);
break;
}
case ReplaceMethod:
@@ -3731,7 +3754,7 @@
Update color information using replace algorithm.
*/
(void) GetOneCacheViewVirtualPixel(image_view,(ssize_t) x_offset,
- (ssize_t) y_offset,&target,&(*image)->exception);
+ (ssize_t) y_offset,&target,exception);
if ((*image)->storage_class == DirectClass)
{
for (y=0; y < (int) (*image)->rows; y++)
@@ -3862,7 +3885,8 @@
% The format of the XCompositeImage method is:
%
% MagickBooleanType XCompositeImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -3875,9 +3899,12 @@
%
% o image: the image; returned from ReadImage.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XCompositeImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
static char
displacement_geometry[MaxTextExtent] = "30x30",
@@ -3953,8 +3980,8 @@
XCheckRefreshWindows(display,windows);
(void) CopyMagickString(resource_info->image_info->filename,filename,
MaxTextExtent);
- composite_image=ReadImage(resource_info->image_info,&image->exception);
- CatchException(&image->exception);
+ composite_image=ReadImage(resource_info->image_info,exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (composite_image == (Image *) NULL)
return(MagickFalse);
@@ -4260,7 +4287,7 @@
*/
resize_image=ResizeImage(composite_image,composite_info.width,
composite_info.height,composite_image->filter,composite_image->blur,
- &image->exception);
+ exception);
composite_image=DestroyImage(composite_image);
if (resize_image == (Image *) NULL)
{
@@ -4277,9 +4304,6 @@
CacheView
*image_view;
- ExceptionInfo
- *exception;
-
int
y;
@@ -4295,7 +4319,6 @@
/*
Create mattes for blending.
*/
- exception=(&image->exception);
(void) SetImageAlphaChannel(composite_image,OpaqueAlphaChannel,exception);
opacity=(Quantum) (ScaleQuantumToChar((Quantum) QuantumRange)-
((ssize_t) ScaleQuantumToChar((Quantum) QuantumRange)*blend)/100);
@@ -4330,7 +4353,7 @@
Update image configuration.
*/
XConfigureImageColormap(display,resource_info,windows,image);
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
@@ -4351,7 +4374,8 @@
% The format of the XConfigureImage method is:
%
% MagickBooleanType XConfigureImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -4364,10 +4388,14 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
+% o exception: return any errors or warnings in this structure.
%
*/
static MagickBooleanType XConfigureImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
char
geometry[MaxTextExtent];
@@ -4419,7 +4447,7 @@
windows->image.y=(int)
(height*windows->image.y/windows->image.ximage->height);
status=XMakeImage(display,resource_info,&windows->image,image,
- (unsigned int) width,(unsigned int) height);
+ (unsigned int) width,(unsigned int) height,exception);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to configure X image:",
windows->image.name);
@@ -4521,7 +4549,7 @@
%
% MagickBooleanType XCropImage(Display *display,
% XResourceInfo *resource_info,XWindows *windows,Image *image,
-% const ClipboardMode mode)
+% const ClipboardMode mode,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -4537,10 +4565,12 @@
% o mode: This unsigned value specified whether the image should be
% cropped, copied, or cut.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XCropImage(Display *display,
XResourceInfo *resource_info,XWindows *windows,Image *image,
- const ClipboardMode mode)
+ const ClipboardMode mode,ExceptionInfo *exception)
{
static const char
*CropModeMenu[] =
@@ -4580,9 +4610,6 @@
Cursor
cursor;
- ExceptionInfo
- *exception;
-
int
id,
x,
@@ -5279,7 +5306,7 @@
XSetCropGeometry(display,windows,&crop_info,image);
windows->image.window_changes.width=(int) crop_info.width;
windows->image.window_changes.height=(int) crop_info.height;
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
/*
@@ -5301,7 +5328,7 @@
crop_info.y+=y;
crop_info.y=(ssize_t) (scale_factor*crop_info.y+0.5);
crop_info.height=(unsigned int) (scale_factor*crop_info.height+0.5);
- crop_image=CropImage(image,&crop_info,&image->exception);
+ crop_image=CropImage(image,&crop_info,exception);
XSetCursorState(display,windows,MagickFalse);
if (crop_image == (Image *) NULL)
return(MagickFalse);
@@ -5310,13 +5337,12 @@
resource_info->copy_image=crop_image;
if (mode == CopyMode)
{
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
/*
Cut image.
*/
- exception=(&image->exception);
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
return(MagickFalse);
image->matte=MagickTrue;
@@ -5340,7 +5366,7 @@
Update image configuration.
*/
XConfigureImageColormap(display,resource_info,windows,image);
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
@@ -5361,7 +5387,8 @@
% The format of the XDrawEditImage method is:
%
% MagickBooleanType XDrawEditImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image **image)
+% XResourceInfo *resource_info,XWindows *windows,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -5374,9 +5401,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XDrawEditImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
static const char
*DrawMenu[] =
@@ -5471,7 +5501,7 @@
sizeof(*coordinate_info));
if (coordinate_info == (XPoint *) NULL)
{
- (void) ThrowMagickException(&(*image)->exception,GetMagickModule(),
+ (void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'","...");
return(MagickFalse);
}
@@ -5710,15 +5740,15 @@
image_info=AcquireImageInfo();
(void) CopyMagickString(image_info->filename,filename,
MaxTextExtent);
- stipple_image=ReadImage(image_info,&(*image)->exception);
- CatchException(&(*image)->exception);
+ stipple_image=ReadImage(image_info,exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (stipple_image == (Image *) NULL)
break;
(void) AcquireUniqueFileResource(filename);
(void) FormatLocaleString(stipple_image->filename,MaxTextExtent,
"xbm:%s",filename);
- (void) WriteImage(image_info,stipple_image,&(*image)->exception);
+ (void) WriteImage(image_info,stipple_image,exception);
stipple_image=DestroyImage(stipple_image);
image_info=DestroyImageInfo(image_info);
status=XReadBitmapFile(display,root_window,filename,&width,
@@ -5769,7 +5799,7 @@
case DrawUndoCommand:
{
(void) XMagickCommand(display,resource_info,windows,UndoCommand,
- image);
+ image,exception);
break;
}
case DrawHelpCommand:
@@ -6096,7 +6126,7 @@
coordinate_info=(XPoint *) ResizeQuantumMemory(coordinate_info,
max_coordinates,sizeof(*coordinate_info));
if (coordinate_info == (XPoint *) NULL)
- (void) ThrowMagickException(&(*image)->exception,GetMagickModule(),
+ (void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'","...");
break;
}
@@ -6123,7 +6153,7 @@
coordinate_info=(XPoint *) ResizeQuantumMemory(coordinate_info,
max_coordinates,sizeof(*coordinate_info));
if (coordinate_info == (XPoint *) NULL)
- (void) ThrowMagickException(&(*image)->exception,GetMagickModule(),
+ (void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'","...");
break;
}
@@ -6221,7 +6251,7 @@
draw_info.x=(int) rectangle_info.x;
draw_info.y=(int) rectangle_info.y;
(void) XMagickCommand(display,resource_info,windows,SaveToUndoBufferCommand,
- image);
+ image,exception);
width=(unsigned int) (*image)->columns;
height=(unsigned int) (*image)->rows;
x=0;
@@ -6294,7 +6324,7 @@
Update image colormap and return to image drawing.
*/
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
}
XSetCursorState(display,windows,MagickFalse);
coordinate_info=(XPoint *) RelinquishMagickMemory(coordinate_info);
@@ -6371,7 +6401,8 @@
% The format of the XImageCache method is:
%
% void XImageCache(Display *display,XResourceInfo *resource_info,
-% XWindows *windows,const CommandType command,Image **image)
+% XWindows *windows,const CommandType command,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -6387,9 +6418,12 @@
% o image: the image; XImageCache may transform the image and return a new
% image pointer.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static void XImageCache(Display *display,XResourceInfo *resource_info,
- XWindows *windows,const CommandType command,Image **image)
+ XWindows *windows,const CommandType command,Image **image,
+ ExceptionInfo *exception)
{
Image
*cache_image;
@@ -6450,7 +6484,7 @@
if (windows->image.orphan != MagickFalse)
return;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
return;
}
case CutCommand:
@@ -6565,7 +6599,7 @@
break;
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- cache_image->list=CloneImage(*image,0,0,MagickTrue,&(*image)->exception);
+ cache_image->list=CloneImage(*image,0,0,MagickTrue,exception);
XSetCursorState(display,windows,MagickFalse);
if (cache_image->list == (Image *) NULL)
{
@@ -6616,7 +6650,7 @@
if (windows->image.orphan != MagickFalse)
return;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
return;
}
if (command != InfoCommand)
@@ -6644,11 +6678,12 @@
% XImageWindowCommand() makes a transform to the image or Image window as
% specified by a user menu button or keyboard command.
%
-% The format of the XMagickCommand method is:
+% The format of the XImageWindowCommand method is:
%
% CommandType XImageWindowCommand(Display *display,
% XResourceInfo *resource_info,XWindows *windows,
-% const MagickStatusType state,KeySym key_symbol,Image **image)
+% const MagickStatusType state,KeySym key_symbol,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -6667,13 +6702,15 @@
%
% o key_symbol: Specifies a command to perform.
%
-% o image: the image; XImageWIndowCommand
-% may transform the image and return a new image pointer.
+% o image: the image; XImageWIndowCommand may transform the image and
+% return a new image pointer.
+%
+% o exception: return any errors or warnings in this structure.
%
*/
static CommandType XImageWindowCommand(Display *display,
XResourceInfo *resource_info,XWindows *windows,const MagickStatusType state,
- KeySym key_symbol,Image **image)
+ KeySym key_symbol,Image **image,ExceptionInfo *exception)
{
static char
delta[MaxTextExtent] = "";
@@ -7011,7 +7048,8 @@
windows->image.window_changes.width=(int) crop_info.width;
windows->image.window_changes.height=(int) crop_info.height;
(void) XSetWindowBackgroundPixmap(display,windows->image.id,None);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,
+ exception);
return(NullCommand);
}
XTranslateImage(display,windows,*image,key_symbol);
@@ -7040,14 +7078,11 @@
% The format of the XMagickCommand method is:
%
% Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
-% XWindows *windows,const CommandType command,Image **image)
+% XWindows *windows,const CommandType command,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
-% o nexus: Method XMagickCommand returns an image when the
-% user chooses 'Load Image' from the command menu. Otherwise a null
-% image is returned.
-%
% o display: Specifies a connection to an X server; returned from
% XOpenDisplay.
%
@@ -7057,12 +7092,15 @@
%
% o command: Specifies a command to perform.
%
-% o image: the image; XMagickCommand
-% may transform the image and return a new image pointer.
+% o image: the image; XMagickCommand may transform the image and return a
+% new image pointer.
+%
+% o exception: return any errors or warnings in this structure.
%
*/
static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
- XWindows *windows,const CommandType command,Image **image)
+ XWindows *windows,const CommandType command,Image **image,
+ ExceptionInfo *exception)
{
char
filename[MaxTextExtent],
@@ -7106,7 +7144,7 @@
Process user command.
*/
XCheckRefreshWindows(display,windows);
- XImageCache(display,resource_info,windows,command,image);
+ XImageCache(display,resource_info,windows,command,image,exception);
nexus=NewImageList();
windows->image.window_changes.width=windows->image.ximage->width;
windows->image.window_changes.height=windows->image.ximage->height;
@@ -7153,8 +7191,8 @@
*/
status=chdir(resource_info->home_directory);
if (status == -1)
- (void) ThrowMagickException(&(*image)->exception,GetMagickModule(),
- FileOpenError,"UnableToOpenFile","%s",resource_info->home_directory);
+ (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
+ "UnableToOpenFile","%s",resource_info->home_directory);
nexus=XOpenImage(display,resource_info,windows,MagickTrue);
break;
}
@@ -7163,7 +7201,7 @@
/*
Save image.
*/
- status=XSaveImage(display,resource_info,windows,*image);
+ status=XSaveImage(display,resource_info,windows,*image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to write X image:",
@@ -7177,7 +7215,7 @@
/*
Print image.
*/
- status=XPrintImage(display,resource_info,windows,*image);
+ status=XPrintImage(display,resource_info,windows,*image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to print X image:",
@@ -7232,8 +7270,8 @@
(void) FormatLocaleString(image_info->filename,MaxTextExtent,
"%s:%s",format,color);
(void) CloneString(&image_info->size,geometry);
- nexus=ReadImage(image_info,&(*image)->exception);
- CatchException(&(*image)->exception);
+ nexus=ReadImage(image_info,exception);
+ CatchException(exception);
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_next_image,CurrentTime);
break;
@@ -7243,7 +7281,7 @@
/*
Visual Image directory.
*/
- nexus=XVisualDirectoryImage(display,resource_info,windows);
+ nexus=XVisualDirectoryImage(display,resource_info,windows,exception);
break;
}
case QuitCommand:
@@ -7275,7 +7313,7 @@
/*
Cut image.
*/
- (void) XCropImage(display,resource_info,windows,*image,CutMode);
+ (void) XCropImage(display,resource_info,windows,*image,CutMode,exception);
break;
}
case CopyCommand:
@@ -7283,7 +7321,8 @@
/*
Copy image.
*/
- (void) XCropImage(display,resource_info,windows,*image,CopyMode);
+ (void) XCropImage(display,resource_info,windows,*image,CopyMode,
+ exception);
break;
}
case PasteCommand:
@@ -7291,7 +7330,7 @@
/*
Paste image.
*/
- status=XPasteImage(display,resource_info,windows,*image);
+ status=XPasteImage(display,resource_info,windows,*image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to paste X image",
@@ -7307,7 +7346,7 @@
*/
windows->image.window_changes.width=windows->image.ximage->width/2;
windows->image.window_changes.height=windows->image.ximage->height/2;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case OriginalSizeCommand:
@@ -7317,7 +7356,7 @@
*/
windows->image.window_changes.width=(int) (*image)->columns;
windows->image.window_changes.height=(int) (*image)->rows;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case DoubleSizeCommand:
@@ -7327,7 +7366,7 @@
*/
windows->image.window_changes.width=windows->image.ximage->width << 1;
windows->image.window_changes.height=windows->image.ximage->height << 1;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ResizeCommand:
@@ -7361,7 +7400,7 @@
(void) ParseMetaGeometry(geometry,&x,&y,&width,&height);
windows->image.window_changes.width=(int) width;
windows->image.window_changes.height=(int) height;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ApplyCommand:
@@ -7390,12 +7429,12 @@
windows->image.x=0;
windows->image.y=0;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case RefreshCommand:
{
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case RestoreCommand:
@@ -7421,7 +7460,7 @@
windows->image.y=0;
}
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case CropCommand:
@@ -7429,7 +7468,8 @@
/*
Crop image.
*/
- (void) XCropImage(display,resource_info,windows,*image,CropMode);
+ (void) XCropImage(display,resource_info,windows,*image,CropMode,
+ exception);
break;
}
case ChopCommand:
@@ -7437,7 +7477,7 @@
/*
Chop image.
*/
- status=XChopImage(display,resource_info,windows,image);
+ status=XChopImage(display,resource_info,windows,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to cut X image",
@@ -7456,13 +7496,13 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- flop_image=FlopImage(*image,&(*image)->exception);
+ flop_image=FlopImage(*image,exception);
if (flop_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=flop_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.crop_geometry != (char *) NULL)
{
@@ -7478,7 +7518,7 @@
}
if (windows->image.orphan != MagickFalse)
break;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case FlipCommand:
@@ -7491,13 +7531,13 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- flip_image=FlipImage(*image,&(*image)->exception);
+ flip_image=FlipImage(*image,exception);
if (flip_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=flip_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.crop_geometry != (char *) NULL)
{
@@ -7513,7 +7553,7 @@
}
if (windows->image.orphan != MagickFalse)
break;
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case RotateRightCommand:
@@ -7521,7 +7561,7 @@
/*
Rotate image 90 degrees clockwise.
*/
- status=XRotateImage(display,resource_info,windows,90.0,image);
+ status=XRotateImage(display,resource_info,windows,90.0,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to rotate X image",
@@ -7535,7 +7575,7 @@
/*
Rotate image 90 degrees counter-clockwise.
*/
- status=XRotateImage(display,resource_info,windows,-90.0,image);
+ status=XRotateImage(display,resource_info,windows,-90.0,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to rotate X image",
@@ -7549,7 +7589,7 @@
/*
Rotate image.
*/
- status=XRotateImage(display,resource_info,windows,0.0,image);
+ status=XRotateImage(display,resource_info,windows,0.0,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to rotate X image",
@@ -7579,29 +7619,30 @@
/*
Shear image.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) QueryColorDatabase(color,&(*image)->background_color,
- &(*image)->exception);
+ exception);
flags=ParseGeometry(geometry,&geometry_info);
if ((flags & SigmaValue) == 0)
geometry_info.sigma=geometry_info.rho;
shear_image=ShearImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (shear_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=shear_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
windows->image.window_changes.width=(int) (*image)->columns;
windows->image.window_changes.height=(int) (*image)->rows;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case RollCommand:
@@ -7622,26 +7663,27 @@
/*
Roll image.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) ParsePageGeometry(*image,geometry,&page_geometry,
- &(*image)->exception);
+ exception);
roll_image=RollImage(*image,page_geometry.x,page_geometry.y,
- &(*image)->exception);
+ exception);
if (roll_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=roll_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
windows->image.window_changes.width=(int) (*image)->columns;
windows->image.window_changes.height=(int) (*image)->rows;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case TrimCommand:
@@ -7661,7 +7703,7 @@
/*
Trim image.
*/
- status=XTrimImage(display,resource_info,windows,*image);
+ status=XTrimImage(display,resource_info,windows,*image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to trim X image",
@@ -7690,12 +7732,12 @@
(void) CopyMagickString(modulate_factors,"100.0/100.0/",MaxTextExtent);
(void) ConcatenateMagickString(modulate_factors,hue_percent,
MaxTextExtent);
- (void) ModulateImage(*image,modulate_factors,&(*image)->exception);
+ (void) ModulateImage(*image,modulate_factors,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SaturationCommand:
@@ -7718,12 +7760,12 @@
(void) CopyMagickString(modulate_factors,"100.0/",MaxTextExtent);
(void) ConcatenateMagickString(modulate_factors,saturation_percent,
MaxTextExtent);
- (void) ModulateImage(*image,modulate_factors,&(*image)->exception);
+ (void) ModulateImage(*image,modulate_factors,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case BrightnessCommand:
@@ -7745,12 +7787,12 @@
XCheckRefreshWindows(display,windows);
(void) CopyMagickString(modulate_factors,brightness_percent,
MaxTextExtent);
- (void) ModulateImage(*image,modulate_factors,&(*image)->exception);
+ (void) ModulateImage(*image,modulate_factors,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case GammaCommand:
@@ -7770,12 +7812,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) GammaImage(*image,atof(factor),&(*image)->exception);
+ (void) GammaImage(*image,atof(factor),exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SpiffCommand:
@@ -7785,12 +7827,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) ContrastImage(*image,MagickTrue,&(*image)->exception);
+ (void) ContrastImage(*image,MagickTrue,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case DullCommand:
@@ -7800,12 +7842,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) ContrastImage(*image,MagickFalse,&(*image)->exception);
+ (void) ContrastImage(*image,MagickFalse,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ContrastStretchCommand:
@@ -7839,12 +7881,12 @@
}
white_point=(MagickRealType) (*image)->columns*(*image)->rows-white_point;
(void) ContrastStretchImage(*image,black_point,white_point,
- &(*image)->exception);
+ exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SigmoidalContrastCommand:
@@ -7876,12 +7918,12 @@
if ((flags & PercentValue) != 0)
geometry_info.sigma=1.0*QuantumRange*geometry_info.sigma/100.0;
(void) SigmoidalContrastImage(*image,MagickTrue,geometry_info.rho,
- geometry_info.sigma,&(*image)->exception);
+ geometry_info.sigma,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case NormalizeCommand:
@@ -7891,12 +7933,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) NormalizeImage(*image,&(*image)->exception);
+ (void) NormalizeImage(*image,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case EqualizeCommand:
@@ -7906,12 +7948,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) EqualizeImage(*image,&(*image)->exception);
+ (void) EqualizeImage(*image,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case NegateCommand:
@@ -7921,12 +7963,12 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) NegateImage(*image,MagickFalse,&(*image)->exception);
+ (void) NegateImage(*image,MagickFalse,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case GrayscaleCommand:
@@ -7942,7 +7984,7 @@
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case MapCommand:
@@ -7965,18 +8007,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
- affinity_image=ReadImage(image_info,&(*image)->exception);
+ affinity_image=ReadImage(image_info,exception);
if (affinity_image != (Image *) NULL)
{
(void) RemapImage(&quantize_info,*image,affinity_image);
affinity_image=DestroyImage(affinity_image);
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case QuantizeCommand:
@@ -8006,7 +8048,7 @@
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case DespeckleCommand:
@@ -8019,18 +8061,18 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- despeckle_image=DespeckleImage(*image,&(*image)->exception);
+ despeckle_image=DespeckleImage(*image,exception);
if (despeckle_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=despeckle_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case EmbossCommand:
@@ -8057,18 +8099,18 @@
if ((flags & SigmaValue) == 0)
geometry_info.sigma=1.0;
emboss_image=EmbossImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (emboss_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=emboss_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ReduceNoiseCommand:
@@ -8093,18 +8135,18 @@
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
noise_image=StatisticImage(*image,NonpeakStatistic,(size_t)
- geometry_info.rho,(size_t) geometry_info.rho,&(*image)->exception);
+ geometry_info.rho,(size_t) geometry_info.rho,exception);
if (noise_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=noise_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case AddNoiseCommand:
@@ -8133,18 +8175,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
noise_image=AddNoiseImage(*image,(NoiseType) ParseCommandOption(
- MagickNoiseOptions,MagickFalse,noise_type),&(*image)->exception);
+ MagickNoiseOptions,MagickFalse,noise_type),exception);
if (noise_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=noise_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SharpenCommand:
@@ -8169,18 +8211,18 @@
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
sharp_image=SharpenImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (sharp_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=sharp_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case BlurCommand:
@@ -8205,18 +8247,18 @@
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
blur_image=BlurImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (blur_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=blur_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ThresholdCommand:
@@ -8245,7 +8287,7 @@
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case EdgeDetectCommand:
@@ -8269,18 +8311,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
- edge_image=EdgeImage(*image,geometry_info.rho,&(*image)->exception);
+ edge_image=EdgeImage(*image,geometry_info.rho,exception);
if (edge_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=edge_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SpreadCommand:
@@ -8304,18 +8346,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(amount,&geometry_info);
- spread_image=EdgeImage(*image,geometry_info.rho,&(*image)->exception);
+ spread_image=EdgeImage(*image,geometry_info.rho,exception);
if (spread_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=spread_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ShadeCommand:
@@ -8345,18 +8387,18 @@
if ((flags & SigmaValue) == 0)
geometry_info.sigma=1.0;
shade_image=ShadeImage(*image,status != 0 ? MagickFalse : MagickTrue,
- geometry_info.rho,geometry_info.sigma,&(*image)->exception);
+ geometry_info.rho,geometry_info.sigma,exception);
if (shade_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=shade_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case RaiseCommand:
@@ -8373,17 +8415,18 @@
/*
Raise an image.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) ParsePageGeometry(*image,bevel_width,&page_geometry,
- &(*image)->exception);
- (void) RaiseImage(*image,&page_geometry,MagickTrue,&(*image)->exception);
+ exception);
+ (void) RaiseImage(*image,&page_geometry,MagickTrue,exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SegmentCommand:
@@ -8412,7 +8455,7 @@
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SepiaToneCommand:
@@ -8439,18 +8482,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
threshold=SiPrefixToDouble(factor,QuantumRange);
- sepia_image=SepiaToneImage(*image,threshold,&(*image)->exception);
+ sepia_image=SepiaToneImage(*image,threshold,exception);
if (sepia_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=sepia_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SolarizeCommand:
@@ -8479,7 +8522,7 @@
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case SwirlCommand:
@@ -8503,18 +8546,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(degrees,&geometry_info);
- swirl_image=SwirlImage(*image,geometry_info.rho,&(*image)->exception);
+ swirl_image=SwirlImage(*image,geometry_info.rho,exception);
if (swirl_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=swirl_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case ImplodeCommand:
@@ -8538,18 +8581,18 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(factor,&geometry_info);
- implode_image=ImplodeImage(*image,geometry_info.rho,&(*image)->exception);
+ implode_image=ImplodeImage(*image,geometry_info.rho,exception);
if (implode_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=implode_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case VignetteCommand:
@@ -8581,18 +8624,18 @@
geometry_info.psi=0.1*(*image)->rows;
vignette_image=VignetteImage(*image,geometry_info.rho,geometry_info.sigma,
(ssize_t) ceil(geometry_info.xi-0.5),(ssize_t) ceil(geometry_info.psi-
- 0.5),&(*image)->exception);
+ 0.5),exception);
if (vignette_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=vignette_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case WaveCommand:
@@ -8619,18 +8662,18 @@
if ((flags & SigmaValue) == 0)
geometry_info.sigma=1.0;
wave_image=WaveImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (wave_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=wave_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case OilPaintCommand:
@@ -8655,18 +8698,18 @@
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
paint_image=OilPaintImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (paint_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=paint_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case CharcoalDrawCommand:
@@ -8687,25 +8730,26 @@
/*
Charcoal the image.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
flags=ParseGeometry(radius,&geometry_info);
if ((flags & SigmaValue) == 0)
geometry_info.sigma=geometry_info.rho;
charcoal_image=CharcoalImage(*image,geometry_info.rho,geometry_info.sigma,
- &(*image)->exception);
+ exception);
if (charcoal_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=charcoal_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case AnnotateCommand:
@@ -8713,7 +8757,7 @@
/*
Annotate the image with text.
*/
- status=XAnnotateEditImage(display,resource_info,windows,*image);
+ status=XAnnotateEditImage(display,resource_info,windows,*image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to annotate X image",
@@ -8727,7 +8771,7 @@
/*
Draw image.
*/
- status=XDrawEditImage(display,resource_info,windows,image);
+ status=XDrawEditImage(display,resource_info,windows,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to draw on the X image",
@@ -8741,7 +8785,7 @@
/*
Color edit.
*/
- status=XColorEditImage(display,resource_info,windows,image);
+ status=XColorEditImage(display,resource_info,windows,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to pixel edit X image",
@@ -8755,7 +8799,7 @@
/*
Matte edit.
*/
- status=XMatteEditImage(display,resource_info,windows,image);
+ status=XMatteEditImage(display,resource_info,windows,image,exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to matte edit X image",
@@ -8769,7 +8813,8 @@
/*
Composite image.
*/
- status=XCompositeImage(display,resource_info,windows,*image);
+ status=XCompositeImage(display,resource_info,windows,*image,
+ exception);
if (status == MagickFalse)
{
XNoticeWidget(display,windows,"Unable to composite X image",
@@ -8799,27 +8844,28 @@
/*
Add a border to the image.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) QueryColorDatabase(color,&(*image)->border_color,
- &(*image)->exception);
+ exception);
(void) ParsePageGeometry(*image,geometry,&page_geometry,
- &(*image)->exception);
- border_image=BorderImage(*image,&page_geometry,&(*image)->exception);
+ exception);
+ border_image=BorderImage(*image,&page_geometry,exception);
if (border_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=border_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
windows->image.window_changes.width=(int) (*image)->columns;
windows->image.window_changes.height=(int) (*image)->rows;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case AddFrameCommand:
@@ -8846,13 +8892,14 @@
/*
Surround image with an ornamental border.
*/
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(void) QueryColorDatabase(color,&(*image)->matte_color,
- &(*image)->exception);
+ exception);
(void) ParsePageGeometry(*image,geometry,&page_geometry,
- &(*image)->exception);
+ exception);
frame_info.width=page_geometry.width;
frame_info.height=page_geometry.height;
frame_info.outer_bevel=page_geometry.x;
@@ -8861,20 +8908,20 @@
frame_info.y=(ssize_t) frame_info.height;
frame_info.width=(*image)->columns+2*frame_info.width;
frame_info.height=(*image)->rows+2*frame_info.height;
- frame_image=FrameImage(*image,&frame_info,&(*image)->exception);
+ frame_image=FrameImage(*image,&frame_info,exception);
if (frame_image != (Image *) NULL)
{
*image=DestroyImage(*image);
*image=frame_image;
}
- CatchException(&(*image)->exception);
+ CatchException(exception);
XSetCursorState(display,windows,MagickFalse);
if (windows->image.orphan != MagickFalse)
break;
windows->image.window_changes.width=(int) (*image)->columns;
windows->image.window_changes.height=(int) (*image)->rows;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
break;
}
case CommentCommand:
@@ -8918,7 +8965,7 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
status=InvokeDelegate(image_info,*image,"edit",(char *) NULL,
- &(*image)->exception);
+ exception);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to edit image comment",
(char *) NULL);
@@ -8927,7 +8974,7 @@
char
*comment;
- comment=FileToString(image_info->filename,~0UL,&(*image)->exception);
+ comment=FileToString(image_info->filename,~0UL,exception);
if (comment != (char *) NULL)
{
(void) SetImageProperty(*image,"comment",comment);
@@ -8948,14 +8995,14 @@
(void) AcquireUniqueFilename(filename);
(void) FormatLocaleString((*image)->filename,MaxTextExtent,"launch:%s",
filename);
- status=WriteImage(image_info,*image,&(*image)->exception);
+ status=WriteImage(image_info,*image,exception);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to launch image editor",
(char *) NULL);
else
{
- nexus=ReadImage(resource_info->image_info,&(*image)->exception);
- CatchException(&(*image)->exception);
+ nexus=ReadImage(resource_info->image_info,exception);
+ CatchException(exception);
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_next_image,CurrentTime);
}
@@ -8968,7 +9015,7 @@
/*
Apply an image processing technique to a region of interest.
*/
- (void) XROIImage(display,resource_info,windows,image);
+ (void) XROIImage(display,resource_info,windows,image,exception);
break;
}
case InfoCommand:
@@ -9027,15 +9074,15 @@
(void) AcquireUniqueFilename(filename);
(void) FormatLocaleString((*image)->filename,MaxTextExtent,"preview:%s",
filename);
- status=WriteImage(image_info,*image,&(*image)->exception);
+ status=WriteImage(image_info,*image,exception);
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
- preview_image=ReadImage(image_info,&(*image)->exception);
+ preview_image=ReadImage(image_info,exception);
(void) RelinquishUniqueFileResource(filename);
if (preview_image == (Image *) NULL)
break;
(void) FormatLocaleString(preview_image->filename,MaxTextExtent,"show:%s",
filename);
- status=WriteImage(image_info,preview_image,&(*image)->exception);
+ status=WriteImage(image_info,preview_image,exception);
preview_image=DestroyImage(preview_image);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to show image preview",
@@ -9060,15 +9107,15 @@
(void) AcquireUniqueFilename(filename);
(void) FormatLocaleString((*image)->filename,MaxTextExtent,"histogram:%s",
filename);
- status=WriteImage(image_info,*image,&(*image)->exception);
+ status=WriteImage(image_info,*image,exception);
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
- histogram_image=ReadImage(image_info,&(*image)->exception);
+ histogram_image=ReadImage(image_info,exception);
(void) RelinquishUniqueFileResource(filename);
if (histogram_image == (Image *) NULL)
break;
(void) FormatLocaleString(histogram_image->filename,MaxTextExtent,
"show:%s",filename);
- status=WriteImage(image_info,histogram_image,&(*image)->exception);
+ status=WriteImage(image_info,histogram_image,exception);
histogram_image=DestroyImage(histogram_image);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to show histogram",
@@ -9099,15 +9146,15 @@
(void) AcquireUniqueFilename(filename);
(void) FormatLocaleString((*image)->filename,MaxTextExtent,"matte:%s",
filename);
- status=WriteImage(image_info,*image,&(*image)->exception);
+ status=WriteImage(image_info,*image,exception);
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
- matte_image=ReadImage(image_info,&(*image)->exception);
+ matte_image=ReadImage(image_info,exception);
(void) RelinquishUniqueFileResource(filename);
if (matte_image == (Image *) NULL)
break;
(void) FormatLocaleString(matte_image->filename,MaxTextExtent,"show:%s",
filename);
- status=WriteImage(image_info,matte_image,&(*image)->exception);
+ status=WriteImage(image_info,matte_image,exception);
matte_image=DestroyImage(matte_image);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to show matte",
@@ -9121,10 +9168,10 @@
/*
Background image.
*/
- status=XBackgroundImage(display,resource_info,windows,image);
+ status=XBackgroundImage(display,resource_info,windows,image,exception);
if (status == MagickFalse)
break;
- nexus=CloneImage(*image,0,0,MagickTrue,&(*image)->exception);
+ nexus=CloneImage(*image,0,0,MagickTrue,exception);
if (nexus != (Image *) NULL)
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_next_image,CurrentTime);
@@ -9155,7 +9202,7 @@
status=XPreferencesWidget(display,resource_info,windows);
if (status == MagickFalse)
break;
- nexus=CloneImage(*image,0,0,MagickTrue,&(*image)->exception);
+ nexus=CloneImage(*image,0,0,MagickTrue,exception);
if (nexus != (Image *) NULL)
XClientMessage(display,windows->image.id,windows->im_protocols,
windows->im_next_image,CurrentTime);
@@ -9207,7 +9254,7 @@
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
status=InvokeDelegate(image_info,*image,"browse",(char *) NULL,
- &(*image)->exception);
+ exception);
if (status == MagickFalse)
XNoticeWidget(display,windows,"Unable to browse documentation",
(char *) NULL);
@@ -9494,7 +9541,7 @@
% The format of the XMakePanImage method is:
%
% void XMakePanImage(Display *display,XResourceInfo *resource_info,
-% XWindows *windows,Image *image)
+% XWindows *windows,Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -9507,9 +9554,11 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static void XMakePanImage(Display *display,XResourceInfo *resource_info,
- XWindows *windows,Image *image)
+ XWindows *windows,Image *image,ExceptionInfo *exception)
{
MagickStatusType
status;
@@ -9522,10 +9571,10 @@
windows->pan.x=(int) windows->image.x;
windows->pan.y=(int) windows->image.y;
status=XMakeImage(display,resource_info,&windows->pan,image,
- windows->pan.width,windows->pan.height);
+ windows->pan.width,windows->pan.height,exception);
if (status == MagickFalse)
- ThrowXWindowFatalException(XServerError,image->exception.reason,
- image->exception.description);
+ ThrowXWindowFatalException(ResourceLimitError,
+ "MemoryAllocationFailed",image->filename);
(void) XSetWindowBackgroundPixmap(display,windows->pan.id,
windows->pan.pixmap);
(void) XClearWindow(display,windows->pan.id);
@@ -9551,7 +9600,8 @@
% The format of the XMatteEditImage method is:
%
% MagickBooleanType XMatteEditImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image **image)
+% XResourceInfo *resource_info,XWindows *windows,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -9564,9 +9614,12 @@
%
% o image: the image; returned from ReadImage.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XMatteEditImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
static char
matte[MaxTextExtent] = "0";
@@ -9824,7 +9877,7 @@
case MatteEditUndoCommand:
{
(void) XMagickCommand(display,resource_info,windows,UndoCommand,
- image);
+ image,exception);
break;
}
case MatteEditHelpCommand:
@@ -9863,7 +9916,7 @@
x=event.xbutton.x;
y=event.xbutton.y;
(void) XMagickCommand(display,resource_info,windows,
- SaveToUndoBufferCommand,image);
+ SaveToUndoBufferCommand,image,exception);
state|=UpdateConfigurationState;
break;
}
@@ -9880,7 +9933,7 @@
x=event.xbutton.x;
y=event.xbutton.y;
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
XInfoWidget(display,windows,text);
(void) XCheckDefineCursor(display,windows->image.id,cursor);
state&=(~UpdateConfigurationState);
@@ -9972,9 +10025,6 @@
CacheView
*image_view;
- ExceptionInfo
- *exception;
-
int
x,
y;
@@ -10002,7 +10052,6 @@
if ((x_offset >= (int) (*image)->columns) ||
(y_offset >= (int) (*image)->rows))
continue;
- exception=(&(*image)->exception);
if (SetImageStorageClass(*image,DirectClass,exception) == MagickFalse)
return(MagickFalse);
(*image)->matte=MagickTrue;
@@ -10037,7 +10086,7 @@
for (y=0; y < (int) (*image)->rows; y++)
{
q=GetCacheViewAuthenticPixels(image_view,0,(ssize_t) y,
- (*image)->columns,1,&(*image)->exception);
+ (*image)->columns,1,exception);
if (q == (Quantum *) NULL)
break;
for (x=0; x < (int) (*image)->columns; x++)
@@ -10494,7 +10543,8 @@
% The format of the XPasteImage method is:
%
% MagickBooleanType XPasteImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -10507,9 +10557,12 @@
%
% o image: the image; returned from ReadImage.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XPasteImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
static const char
*PasteMenu[] =
@@ -10568,8 +10621,7 @@
*/
if (resource_info->copy_image == (Image *) NULL)
return(MagickFalse);
- paste_image=CloneImage(resource_info->copy_image,0,0,MagickTrue,
- &image->exception);
+ paste_image=CloneImage(resource_info->copy_image,0,0,MagickTrue,exception);
/*
Map Command widget.
*/
@@ -10840,7 +10892,7 @@
Update image colormap.
*/
XConfigureImageColormap(display,resource_info,windows,image);
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
return(MagickTrue);
}
@@ -10860,7 +10912,8 @@
% The format of the XPrintImage method is:
%
% MagickBooleanType XPrintImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -10873,9 +10926,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XPrintImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
char
filename[MaxTextExtent],
@@ -10907,7 +10963,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- print_image=CloneImage(image,0,0,MagickTrue,&image->exception);
+ print_image=CloneImage(image,0,0,MagickTrue,exception);
if (print_image == (Image *) NULL)
return(MagickFalse);
(void) FormatLocaleString(geometry,MaxTextExtent,"%dx%d!",
@@ -10919,7 +10975,7 @@
(void) AcquireUniqueFilename(filename);
(void) FormatLocaleString(print_image->filename,MaxTextExtent,"print:%s",
filename);
- status=WriteImage(image_info,print_image,&image->exception);
+ status=WriteImage(image_info,print_image,exception);
(void) RelinquishUniqueFileResource(filename);
print_image=DestroyImage(print_image);
image_info=DestroyImageInfo(image_info);
@@ -10943,7 +10999,8 @@
% The format of the XROIImage method is:
%
% MagickBooleanType XROIImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image **image)
+% XResourceInfo *resource_info,XWindows *windows,Image **image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -10956,9 +11013,12 @@
%
% o image: the image; returned from ReadImage.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XROIImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,Image **image,
+ ExceptionInfo *exception)
{
#define ApplyMenus 7
@@ -11513,7 +11573,7 @@
case RedoCommand:
{
(void) XMagickCommand(display,resource_info,windows,command_type,
- image);
+ image,exception);
break;
}
default:
@@ -11541,7 +11601,7 @@
crop_info.y=(ssize_t) (scale_factor*crop_info.y+0.5);
crop_info.height=(unsigned int)
(scale_factor*crop_info.height+0.5);
- roi_image=CropImage(*image,&crop_info,&(*image)->exception);
+ roi_image=CropImage(*image,&crop_info,exception);
(void) SetImageProgressMonitor(*image,progress_monitor,
(*image)->client_data);
if (roi_image == (Image *) NULL)
@@ -11551,11 +11611,11 @@
*/
windows->image.orphan=MagickTrue;
(void) XMagickCommand(display,resource_info,windows,command_type,
- &roi_image);
+ &roi_image,exception);
progress_monitor=SetImageProgressMonitor(*image,
(MagickProgressMonitor) NULL,(*image)->client_data);
(void) XMagickCommand(display,resource_info,windows,
- SaveToUndoBufferCommand,image);
+ SaveToUndoBufferCommand,image,exception);
windows->image.orphan=MagickFalse;
(void) CompositeImage(*image,CopyCompositeOp,roi_image,
crop_info.x,crop_info.y);
@@ -11568,7 +11628,7 @@
if (command_type != InfoCommand)
{
XConfigureImageColormap(display,resource_info,windows,*image);
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
}
XCheckRefreshWindows(display,windows);
XInfoWidget(display,windows,text);
@@ -11784,7 +11844,7 @@
default:
{
command_type=XImageWindowCommand(display,resource_info,windows,
- event.xkey.state,key_symbol,image);
+ event.xkey.state,key_symbol,image,exception);
if (command_type != NullCommand)
state|=UpdateRegionState;
break;
@@ -11887,7 +11947,7 @@
%
% MagickBooleanType XRotateImage(Display *display,
% XResourceInfo *resource_info,XWindows *windows,double degrees,
-% Image **image)
+% Image **image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -11902,9 +11962,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XRotateImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,double degrees,Image **image)
+ XResourceInfo *resource_info,XWindows *windows,double degrees,Image **image,
+ ExceptionInfo *exception)
{
static const char
*RotateMenu[] =
@@ -12287,7 +12350,8 @@
for (rotations=0; normalized_degrees > 45.0; rotations++)
normalized_degrees-=90.0;
if (normalized_degrees != 0.0)
- (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image);
+ (void) XMagickCommand(display,resource_info,windows,ApplyCommand,image,
+ exception);
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
(*image)->background_color.red=ScaleShortToQuantum(
@@ -12296,7 +12360,7 @@
windows->pixel_info->pen_colors[pen_id].green);
(*image)->background_color.blue=ScaleShortToQuantum(
windows->pixel_info->pen_colors[pen_id].blue);
- rotate_image=RotateImage(*image,degrees,&(*image)->exception);
+ rotate_image=RotateImage(*image,degrees,exception);
XSetCursorState(display,windows,MagickFalse);
if (rotate_image == (Image *) NULL)
return(MagickFalse);
@@ -12375,7 +12439,7 @@
/*
Update image configuration.
*/
- (void) XConfigureImage(display,resource_info,windows,*image);
+ (void) XConfigureImage(display,resource_info,windows,*image,exception);
return(MagickTrue);
}
@@ -12395,7 +12459,8 @@
% The format of the XSaveImage method is:
%
% MagickBooleanType XSaveImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -12408,9 +12473,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XSaveImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
char
filename[MaxTextExtent],
@@ -12443,7 +12511,7 @@
GetPathComponent(image->filename,TailPath,filename);
status=chdir(path);
if (status == -1)
- (void) ThrowMagickException(&image->exception,GetMagickModule(),
+ (void) ThrowMagickException(exception,GetMagickModule(),
FileOpenError,"UnableToOpenFile","%s",path);
}
XFileBrowserWidget(display,windows,"Save",filename);
@@ -12463,7 +12531,7 @@
}
image_info=CloneImageInfo(resource_info->image_info);
(void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
- (void) SetImageInfo(image_info,1,&image->exception);
+ (void) SetImageInfo(image_info,1,exception);
if ((LocaleCompare(image_info->magick,"JPEG") == 0) ||
(LocaleCompare(image_info->magick,"JPG") == 0))
{
@@ -12511,7 +12579,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- save_image=CloneImage(image,0,0,MagickTrue,&image->exception);
+ save_image=CloneImage(image,0,0,MagickTrue,exception);
if (save_image == (Image *) NULL)
return(MagickFalse);
(void) FormatLocaleString(geometry,MaxTextExtent,"%dx%d!",
@@ -12521,7 +12589,7 @@
Write image.
*/
(void) CopyMagickString(save_image->filename,filename,MaxTextExtent);
- status=WriteImage(image_info,save_image,&image->exception);
+ status=WriteImage(image_info,save_image,exception);
if (status != MagickFalse)
image->taint=MagickFalse;
save_image=DestroyImage(save_image);
@@ -12905,7 +12973,7 @@
% The format of the XTileImage method is:
%
% Image *XTileImage(Display *display,XResourceInfo *resource_info,
-% XWindows *windows,Image *image,XEvent *event)
+% XWindows *windows,Image *image,XEvent *event,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -12924,9 +12992,11 @@
% o event: Specifies a pointer to a XEvent structure. If it is NULL,
% the entire image is refreshed.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static Image *XTileImage(Display *display,XResourceInfo *resource_info,
- XWindows *windows,Image *image,XEvent *event)
+ XWindows *windows,Image *image,XEvent *event,ExceptionInfo *exception)
{
static const char
*VerbMenu[] =
@@ -13056,8 +13126,8 @@
MaxTextExtent);
(void) CopyMagickString(resource_info->image_info->filename,filename,
MaxTextExtent);
- tile_image=ReadImage(resource_info->image_info,&image->exception);
- CatchException(&image->exception);
+ tile_image=ReadImage(resource_info->image_info,exception);
+ CatchException(exception);
(void) XWithdrawWindow(display,windows->info.id,windows->info.screen);
break;
}
@@ -13102,9 +13172,6 @@
}
case TileUpdateCommand:
{
- ExceptionInfo
- *exception;
-
int
x_offset,
y_offset;
@@ -13142,7 +13209,6 @@
*/
x_offset=(int) (width*(tile % (((int) image->columns-x)/width))+x);
y_offset=(int) (height*(tile/(((int) image->columns-x)/width))+y);
- exception=(&image->exception);
image_view=AcquireCacheView(image);
(void) GetOneCacheViewVirtualPixel(image_view,0,0,&pixel,exception);
for (i=0; i < (int) height; i++)
@@ -13165,7 +13231,7 @@
windows->image.window_changes.width=(int) image->columns;
windows->image.window_changes.height=(int) image->rows;
XConfigureImageColormap(display,resource_info,windows,image);
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
break;
}
default:
@@ -13311,7 +13377,8 @@
% The format of the XTrimImage method is:
%
% MagickBooleanType XTrimImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows,Image *image)
+% XResourceInfo *resource_info,XWindows *windows,Image *image,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -13324,9 +13391,12 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType XTrimImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows,Image *image)
+ XResourceInfo *resource_info,XWindows *windows,Image *image,
+ ExceptionInfo *exception)
{
RectangleInfo
trim_info;
@@ -13424,7 +13494,7 @@
XSetCropGeometry(display,windows,&trim_info,image);
windows->image.window_changes.width=(int) trim_info.width;
windows->image.window_changes.height=(int) trim_info.height;
- (void) XConfigureImage(display,resource_info,windows,image);
+ (void) XConfigureImage(display,resource_info,windows,image,exception);
}
XSetCursorState(display,windows,MagickFalse);
return(MagickTrue);
@@ -13446,14 +13516,11 @@
% The format of the XVisualDirectoryImage method is:
%
% Image *XVisualDirectoryImage(Display *display,
-% XResourceInfo *resource_info,XWindows *windows)
+% XResourceInfo *resource_info,XWindows *windows,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
-% o nexus: Method XVisualDirectoryImage returns a visual image
-% directory if it can be created successfully. Otherwise a null image
-% is returned.
-%
% o display: Specifies a connection to an X server; returned from
% XOpenDisplay.
%
@@ -13461,9 +13528,11 @@
%
% o windows: Specifies a pointer to a XWindows structure.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static Image *XVisualDirectoryImage(Display *display,
- XResourceInfo *resource_info,XWindows *windows)
+ XResourceInfo *resource_info,XWindows *windows,ExceptionInfo *exception)
{
#define TileImageTag "Scale/Image"
#define XClientName "montage"
@@ -13471,9 +13540,6 @@
char
**filelist;
- ExceptionInfo
- *exception;
-
Image
*images,
*montage_image,
@@ -13555,7 +13621,6 @@
(void) SetImageInfoProgressMonitor(read_info,(MagickProgressMonitor) NULL,
(void *) NULL);
images=NewImageList();
- exception=AcquireExceptionInfo();
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
for (i=0; i < (int) number_files; i++)
@@ -13582,7 +13647,7 @@
if (backdrop)
{
(void) XDisplayBackgroundImage(display,&background_resources,
- next_image);
+ next_image,exception);
XSetCursorState(display,windows,MagickTrue);
}
AppendImageToList(&images,next_image);
@@ -13598,7 +13663,6 @@
}
}
}
- exception=DestroyExceptionInfo(exception);
filelist=(char **) RelinquishMagickMemory(filelist);
if (images == (Image *) NULL)
{
@@ -13616,7 +13680,7 @@
(void) CloneString(&montage_info->font,resource_info->font);
(void) CopyMagickString(montage_info->filename,filename,MaxTextExtent);
montage_image=MontageImageList(read_info,montage_info,GetFirstImageInList(
- images),&images->exception);
+ images),exception);
images=DestroyImageList(images);
montage_info=DestroyMontageInfo(montage_info);
read_info=DestroyImageInfo(read_info);
@@ -13644,7 +13708,7 @@
% The format of the XDisplayBackgroundImage method is:
%
% MagickBooleanType XDisplayBackgroundImage(Display *display,
-% XResourceInfo *resource_info,Image *image)
+% XResourceInfo *resource_info,Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -13655,9 +13719,11 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickExport MagickBooleanType XDisplayBackgroundImage(Display *display,
- XResourceInfo *resource_info,Image *image)
+ XResourceInfo *resource_info,Image *image,ExceptionInfo *exception)
{
char
geometry[MaxTextExtent],
@@ -13811,7 +13877,7 @@
window_info.x=(int) geometry_info.x;
window_info.y=(int) geometry_info.y;
status=XMakeImage(display,&resources,&window_info,image,window_info.width,
- window_info.height);
+ window_info.height,exception);
if (status == MagickFalse)
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
image->filename);
@@ -13921,7 +13987,8 @@
% The format of the XDisplayImage method is:
%
% Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
-% char **argv,int argc,Image **image,size_t *state)
+% char **argv,int argc,Image **image,size_t *state,
+% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -13940,9 +14007,11 @@
%
% o image: Specifies an address to an address of an Image structure;
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
- char **argv,int argc,Image **image,size_t *state)
+ char **argv,int argc,Image **image,size_t *state,ExceptionInfo *exception)
{
#define MagnifySize 256 /* must be a power of 2 */
#define MagickMenus 10
@@ -14406,8 +14475,8 @@
status=chdir(working_directory);
if (status == -1)
- (void) ThrowMagickException(&(*image)->exception,GetMagickModule(),
- FileOpenError,"UnableToOpenFile","%s",working_directory);
+ (void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
+ "UnableToOpenFile","%s",working_directory);
warning_handler=resource_info->display_warnings ?
SetErrorHandler(XWarning) : SetErrorHandler((ErrorHandler) NULL);
warning_handler=resource_info->display_warnings ?
@@ -14909,12 +14978,12 @@
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
display_image->filename);
status=XMakeImage(display,resource_info,&windows->image,display_image,
- width,height);
+ width,height,exception);
if (status == MagickFalse)
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
display_image->filename);
status=XMakeImage(display,resource_info,&windows->magnify,(Image *) NULL,
- windows->magnify.width,windows->magnify.height);
+ windows->magnify.width,windows->magnify.height,exception);
if (status == MagickFalse)
ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
display_image->filename);
@@ -14924,7 +14993,7 @@
(void) XMapRaised(display,windows->pan.id);
windows->image.window_changes.width=(int) display_image->columns;
windows->image.window_changes.height=(int) display_image->rows;
- (void) XConfigureImage(display,resource_info,windows,display_image);
+ (void) XConfigureImage(display,resource_info,windows,display_image,exception);
(void) XWithdrawWindow(display,windows->info.id,windows->info.screen);
(void) XSync(display,MagickFalse);
/*
@@ -15033,7 +15102,7 @@
}
if (command_type != NullCommand)
nexus=XMagickCommand(display,resource_info,windows,command_type,
- &display_image);
+ &display_image,exception);
continue;
}
switch (event.type)
@@ -15074,7 +15143,7 @@
command);
if (entry >= 0)
nexus=XMagickCommand(display,resource_info,windows,
- VirtualCommands[entry],&display_image);
+ VirtualCommands[entry],&display_image,exception);
break;
}
/*
@@ -15097,7 +15166,7 @@
User pressed the image magnify button.
*/
(void) XMagickCommand(display,resource_info,windows,ZoomCommand,
- &display_image);
+ &display_image,exception);
XMagnifyImage(display,windows,&event);
break;
}
@@ -15112,7 +15181,7 @@
command);
if (entry >= 0)
nexus=XMagickCommand(display,resource_info,windows,
- VirtualCommands[entry],&display_image);
+ VirtualCommands[entry],&display_image,exception);
break;
}
if (display_image->montage != (char *) NULL)
@@ -15121,7 +15190,7 @@
Open or delete a tile from a visual image directory.
*/
nexus=XTileImage(display,resource_info,windows,
- display_image,&event);
+ display_image,&event,exception);
if (nexus != (Image *) NULL)
*state|=MontageImageState | NextImageState | ExitState;
vid_info.x=(short int) windows->image.x;
@@ -15135,7 +15204,7 @@
command);
if (entry >= 0)
nexus=XMagickCommand(display,resource_info,windows,
- ShortCutsCommands[entry],&display_image);
+ ShortCutsCommands[entry],&display_image,exception);
break;
}
case Button4:
@@ -15400,7 +15469,7 @@
windows->image.window_changes.width=windows->image.ximage->width;
windows->image.window_changes.height=windows->image.ximage->height;
(void) XConfigureImage(display,resource_info,windows,
- display_image);
+ display_image,exception);
}
break;
}
@@ -15500,7 +15569,7 @@
windows->image.window_changes.width=event.xconfigure.width;
windows->image.window_changes.height=event.xconfigure.height;
(void) XConfigureImage(display,resource_info,windows,
- display_image);
+ display_image,exception);
}
/*
Update pan window configuration.
@@ -15549,7 +15618,8 @@
(windows->magnify.stasis != MagickFalse))
{
status=XMakeImage(display,resource_info,&windows->magnify,
- display_image,windows->magnify.width,windows->magnify.height);
+ display_image,windows->magnify.width,windows->magnify.height,
+ exception);
XMakeMagnifyImage(display,windows);
}
break;
@@ -15660,10 +15730,10 @@
if (event.xkey.window == windows->image.id)
{
command_type=XImageWindowCommand(display,resource_info,windows,
- event.xkey.state,key_symbol,&display_image);
+ event.xkey.state,key_symbol,&display_image,exception);
if (command_type != NullCommand)
nexus=XMagickCommand(display,resource_info,windows,command_type,
- &display_image);
+ &display_image,exception);
}
if (event.xkey.window == windows->magnify.id)
XMagnifyWindowCommand(display,windows,event.xkey.state,key_symbol);
@@ -15743,7 +15813,8 @@
}
if (event.xmap.window == windows->pan.id)
{
- XMakePanImage(display,resource_info,windows,display_image);
+ XMakePanImage(display,resource_info,windows,display_image,
+ exception);
windows->pan.mapped=MagickTrue;
break;
}
@@ -15764,7 +15835,8 @@
XMakeStandardColormap(display,icon_visual,icon_resources,
display_image,icon_map,icon_pixel);
(void) XMakeImage(display,icon_resources,&windows->icon,
- display_image,windows->icon.width,windows->icon.height);
+ display_image,windows->icon.width,windows->icon.height,
+ exception);
display_image->taint=taint;
(void) XSetWindowBackgroundPixmap(display,windows->icon.id,
windows->icon.pixmap);
@@ -15926,7 +15998,7 @@
} while (!(*state & ExitState));
if ((*state & ExitState) == 0)
(void) XMagickCommand(display,resource_info,windows,FreeBuffersCommand,
- &display_image);
+ &display_image,exception);
else
if (resource_info->confirm_edit != MagickFalse)
{
@@ -15946,7 +16018,7 @@
else
if (status > 0)
(void) XMagickCommand(display,resource_info,windows,SaveCommand,
- &display_image);
+ &display_image,exception);
}
}
if ((windows->visual_info->klass == GrayScale) ||
@@ -16044,7 +16116,7 @@
% The format of the DisplayImages method is:
%
% MagickBooleanType DisplayImages(const ImageInfo *image_info,
-% Image *images)
+% Image *images,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -16052,9 +16124,11 @@
%
% o image: the image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
MagickExport MagickBooleanType DisplayImages(const ImageInfo *image_info,
- Image *image)
+ Image *image,ExceptionInfo *exception)
{
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
@@ -16062,9 +16136,8 @@
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- (void) ThrowMagickException(&image->exception,GetMagickModule(),
- MissingDelegateError,"DelegateLibrarySupportNotBuiltIn","`%s' (X11)",
- image->filename);
+ (void) ThrowMagickException(exception,GetMagickModule(),MissingDelegateError,
+ "DelegateLibrarySupportNotBuiltIn","`%s' (X11)",image->filename);
return(MagickFalse);
}