]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 20 Oct 2011 23:23:00 +0000 (23:23 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 20 Oct 2011 23:23:00 +0000 (23:23 +0000)
MagickCore/animate.c
MagickCore/display.c
MagickCore/widget.c
MagickCore/xwindow-private.h
MagickCore/xwindow.c
MagickCore/xwindow.h
MagickWand/import.c
coders/x.c

index d5c2a97d975583217389b989a750c9e638507f33..12ccdda450f46563b68bad6c60bd8d74f78a67a0 100644 (file)
@@ -581,7 +581,8 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
     }
     case InfoCommand:
     {
-      XDisplayImageInfo(display,resource_info,windows,(Image *) NULL,*image);
+      XDisplayImageInfo(display,resource_info,windows,(Image *) NULL,*image,
+        exception);
       break;
     }
     case HelpCommand:
@@ -932,7 +933,7 @@ MagickExport void XAnimateBackgroundImage(Display *display,
     (void) SetImageType(display_image,display_image->matte == MagickFalse ?
       TrueColorType : TrueColorMatteType,exception);
   XMakeStandardColormap(display,visual_info,&resources,display_image,map_info,
-    &pixel);
+    &pixel,exception);
   /*
     Graphic context superclass.
   */
@@ -1562,7 +1563,7 @@ MagickExport Image *XAnimateImages(Display *display,
         display_image->magick);
     }
   XMakeStandardColormap(display,visual_info,resource_info,display_image,
-    map_info,pixel);
+    map_info,pixel,exception);
   /*
     Initialize graphic context.
   */
@@ -2635,7 +2636,7 @@ MagickExport Image *XAnimateImages(Display *display,
               Create an icon image.
             */
             XMakeStandardColormap(display,icon_visual,icon_resources,
-              display_image,icon_map,icon_pixel);
+              display_image,icon_map,icon_pixel,exception);
             (void) XMakeImage(display,icon_resources,&windows->icon,
               display_image,windows->icon.width,windows->icon.height,
               exception);
@@ -2743,7 +2744,7 @@ MagickExport Image *XAnimateImages(Display *display,
           {
             if (map_info->colormap == icon_map->colormap)
               XConfigureImageColormap(display,resource_info,windows,
-                display_image);
+                display_image,exception);
             (void) XFreeStandardColormap(display,icon_visual,icon_map,
               icon_pixel);
             windows->icon.mapped=MagickFalse;
index 1cff73077f844ab62f794d0bd4378b9192ff4a42..797b385ec59d6b9952777672825e2adf901849ef 100644 (file)
@@ -1605,13 +1605,13 @@ static void
   XDrawPanRectangle(Display *,XWindows *),
   XImageCache(Display *,XResourceInfo *,XWindows *,const CommandType,Image **,
     ExceptionInfo *),
-  XMagnifyImage(Display *,XWindows *,XEvent *),
+  XMagnifyImage(Display *,XWindows *,XEvent *,ExceptionInfo *),
   XMakePanImage(Display *,XResourceInfo *,XWindows *,Image *,ExceptionInfo *),
-  XPanImage(Display *,XWindows *,XEvent *),
+  XPanImage(Display *,XWindows *,XEvent *,ExceptionInfo *),
   XMagnifyWindowCommand(Display *,XWindows *,const MagickStatusType,
-    const KeySym),
+    const KeySym,ExceptionInfo *),
   XSetCropGeometry(Display *,XWindows *,RectangleInfo *,Image *),
-  XScreenEvent(Display *,XWindows *,XEvent *),
+  XScreenEvent(Display *,XWindows *,XEvent *,ExceptionInfo *),
   XTranslateImage(Display *,XWindows *,Image *,const KeySym);
 \f
 /*
@@ -1942,7 +1942,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -2315,7 +2315,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -2752,7 +2752,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
   /*
     Update image configuration.
   */
-  XConfigureImageColormap(display,resource_info,windows,image);
+  XConfigureImageColormap(display,resource_info,windows,image,exception);
   (void) XConfigureImage(display,resource_info,windows,image,exception);
   return(MagickTrue);
 }
@@ -2953,7 +2953,7 @@ static MagickBooleanType XChopImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -3131,7 +3131,7 @@ static MagickBooleanType XChopImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (distance > 9)
       XHighlightLine(display,windows->image.id,
         windows->image.highlight_context,&segment_info);
@@ -3248,7 +3248,7 @@ static MagickBooleanType XChopImage(Display *display,
   /*
     Update image configuration.
   */
-  XConfigureImageColormap(display,resource_info,windows,*image);
+  XConfigureImageColormap(display,resource_info,windows,*image,exception);
   (void) XConfigureImage(display,resource_info,windows,*image,exception);
   return(MagickTrue);
 }
@@ -3395,7 +3395,7 @@ static MagickBooleanType XColorEditImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -3612,7 +3612,7 @@ static MagickBooleanType XColorEditImage(Display *display,
         */
         x=event.xbutton.x;
         y=event.xbutton.y;
-        XConfigureImageColormap(display,resource_info,windows,*image);
+        XConfigureImageColormap(display,resource_info,windows,*image,exception);
         (void) XConfigureImage(display,resource_info,windows,*image,exception);
         XInfoWidget(display,windows,text);
         (void) XCheckDefineCursor(display,windows->image.id,cursor);
@@ -4040,7 +4040,7 @@ static MagickBooleanType XCompositeImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     XHighlightRectangle(display,windows->image.id,
       windows->image.highlight_context,&highlight_info);
     if (event.xany.window == windows->command.id)
@@ -4365,7 +4365,7 @@ static MagickBooleanType XCompositeImage(Display *display,
   /*
     Update image configuration.
   */
-  XConfigureImageColormap(display,resource_info,windows,image);
+  XConfigureImageColormap(display,resource_info,windows,image,exception);
   (void) XConfigureImage(display,resource_info,windows,image,exception);
   return(MagickTrue);
 }
@@ -4498,7 +4498,7 @@ static MagickBooleanType XConfigureImage(Display *display,
     Update Magnify window configuration.
   */
   if (windows->magnify.mapped != MagickFalse)
-    XMakeMagnifyImage(display,windows);
+    XMakeMagnifyImage(display,windows,exception);
   windows->pan.crop_geometry=windows->image.crop_geometry;
   XBestIconSize(display,&windows->pan,image);
   while (((windows->pan.width << 1) < MaxIconSize) &&
@@ -4707,7 +4707,7 @@ static MagickBooleanType XCropImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -4908,7 +4908,7 @@ static MagickBooleanType XCropImage(Display *display,
       /*
         Wait for next event.
       */
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       if ((highlight_info.width > 3) && (highlight_info.height > 3))
         XHighlightRectangle(display,windows->image.id,
           windows->image.highlight_context,&highlight_info);
@@ -5004,7 +5004,7 @@ static MagickBooleanType XCropImage(Display *display,
         }
       XHighlightRectangle(display,windows->image.id,
         windows->image.highlight_context,&highlight_info);
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       if (event.xany.window == windows->command.id)
         {
           /*
@@ -5378,7 +5378,7 @@ static MagickBooleanType XCropImage(Display *display,
   /*
     Update image configuration.
   */
-  XConfigureImageColormap(display,resource_info,windows,image);
+  XConfigureImageColormap(display,resource_info,windows,image,exception);
   (void) XConfigureImage(display,resource_info,windows,image,exception);
   return(MagickTrue);
 }
@@ -5555,7 +5555,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
       /*
         Wait for next event.
       */
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       if (event.xany.window == windows->command.id)
         {
           /*
@@ -6057,7 +6057,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
       /*
         Wait for next event.
       */
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       switch (element)
       {
         case PointElement:
@@ -6331,12 +6331,12 @@ static MagickBooleanType XDrawEditImage(Display *display,
     */
     XSetCursorState(display,windows,MagickTrue);
     XCheckRefreshWindows(display,windows);
-    status=XDrawImage(display,windows->pixel_info,&draw_info,*image);
+    status=XDrawImage(display,windows->pixel_info,&draw_info,*image,exception);
     XSetCursorState(display,windows,MagickFalse);
     /*
       Update image colormap and return to image drawing.
     */
-    XConfigureImageColormap(display,resource_info,windows,*image);
+    XConfigureImageColormap(display,resource_info,windows,*image,exception);
     (void) XConfigureImage(display,resource_info,windows,*image,exception);
   }
   XSetCursorState(display,windows,MagickFalse);
@@ -6497,7 +6497,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
       cache_image=DestroyImage(cache_image);
       if (windows->image.orphan != MagickFalse)
         return;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       return;
     }
@@ -6663,7 +6663,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
       redo_image=NewImageList();
       if (windows->image.orphan != MagickFalse)
         return;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       return;
     }
@@ -6674,7 +6674,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
   */
   XSetCursorState(display,windows,MagickTrue);
   XCheckRefreshWindows(display,windows);
-  XDisplayImageInfo(display,resource_info,windows,undo_image,*image);
+  XDisplayImageInfo(display,resource_info,windows,undo_image,*image,exception);
   XSetCursorState(display,windows,MagickFalse);
 }
 \f
@@ -7455,7 +7455,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
           windows->image.crop_geometry);
       windows->image.x=0;
       windows->image.y=0;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7486,7 +7486,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
           windows->image.x=0;
           windows->image.y=0;
         }
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7668,7 +7668,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         break;
       windows->image.window_changes.width=(int) (*image)->columns;
       windows->image.window_changes.height=(int) (*image)->rows;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7709,7 +7709,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         break;
       windows->image.window_changes.width=(int) (*image)->columns;
       windows->image.window_changes.height=(int) (*image)->rows;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7763,7 +7763,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7791,7 +7791,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7818,7 +7818,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7843,7 +7843,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7858,7 +7858,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7873,7 +7873,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7912,7 +7912,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7949,7 +7949,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7964,7 +7964,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7979,7 +7979,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -7994,7 +7994,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8010,7 +8010,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8044,7 +8044,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8074,7 +8074,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8098,7 +8098,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8136,7 +8136,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8172,7 +8172,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8212,7 +8212,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8248,7 +8248,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8284,7 +8284,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8313,7 +8313,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8349,7 +8349,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8385,7 +8385,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8426,7 +8426,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8454,7 +8454,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8483,7 +8483,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8521,7 +8521,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8550,7 +8550,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8586,7 +8586,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8622,7 +8622,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8665,7 +8665,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8703,7 +8703,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8739,7 +8739,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8779,7 +8779,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickFalse);
       if (windows->image.orphan != MagickFalse)
         break;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8896,7 +8896,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         break;
       windows->image.window_changes.width=(int) (*image)->columns;
       windows->image.window_changes.height=(int) (*image)->rows;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -8952,7 +8952,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
         break;
       windows->image.window_changes.width=(int) (*image)->columns;
       windows->image.window_changes.height=(int) (*image)->rows;
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
       (void) XConfigureImage(display,resource_info,windows,*image,exception);
       break;
     }
@@ -9328,7 +9328,8 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
 %
 %  The format of the XMagnifyImage method is:
 %
-%      void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
+%      void XMagnifyImage(Display *display,XWindows *windows,XEvent *event,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -9340,8 +9341,11 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
 %    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 void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
+static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event,
+  ExceptionInfo *exception)
 {
   char
     text[MaxTextExtent];
@@ -9389,7 +9393,7 @@ static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,event);
+    XScreenEvent(display,windows,event,exception);
     switch (event->type)
     {
       case ButtonPress:
@@ -9452,7 +9456,8 @@ static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
 %  The format of the XMagnifyWindowCommand method is:
 %
 %      void XMagnifyWindowCommand(Display *display,XWindows *windows,
-%        const MagickStatusType state,const KeySym key_symbol)
+%        const MagickStatusType state,const KeySym key_symbol,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -9466,9 +9471,11 @@ static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
 %    o key_symbol: Specifies a KeySym which indicates which side of the image
 %      to trim.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 static void XMagnifyWindowCommand(Display *display,XWindows *windows,
-  const MagickStatusType state,const KeySym key_symbol)
+  const MagickStatusType state,const KeySym key_symbol,ExceptionInfo *exception)
 {
   unsigned int
     quantum;
@@ -9553,7 +9560,7 @@ static void XMagnifyWindowCommand(Display *display,XWindows *windows,
     default:
       break;
   }
-  XMakeMagnifyImage(display,windows);
+  XMakeMagnifyImage(display,windows,exception);
 }
 \f
 /*
@@ -9754,7 +9761,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -9964,7 +9971,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
         */
         x=event.xbutton.x;
         y=event.xbutton.y;
-        XConfigureImageColormap(display,resource_info,windows,*image);
+        XConfigureImageColormap(display,resource_info,windows,*image,exception);
         (void) XConfigureImage(display,resource_info,windows,*image,exception);
         XInfoWidget(display,windows,text);
         (void) XCheckDefineCursor(display,windows->image.id,cursor);
@@ -10413,7 +10420,8 @@ static Image *XOpenImage(Display *display,XResourceInfo *resource_info,
 %
 %  The format of the XPanImage method is:
 %
-%      void XPanImage(Display *display,XWindows *windows,XEvent *event)
+%      void XPanImage(Display *display,XWindows *windows,XEvent *event,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -10425,8 +10433,11 @@ static Image *XOpenImage(Display *display,XResourceInfo *resource_info,
 %    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 void XPanImage(Display *display,XWindows *windows,XEvent *event)
+static void XPanImage(Display *display,XWindows *windows,XEvent *event,
+  ExceptionInfo *exception)
 {
   char
     text[MaxTextExtent];
@@ -10555,7 +10566,7 @@ static void XPanImage(Display *display,XWindows *windows,XEvent *event)
       Wait for next event.
     */
     if ((state & ExitState) == 0)
-      XScreenEvent(display,windows,event);
+      XScreenEvent(display,windows,event,exception);
   } while ((state & ExitState) == 0);
   /*
     Restore cursor.
@@ -10703,7 +10714,7 @@ static MagickBooleanType XPasteImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     XHighlightRectangle(display,windows->image.id,
       windows->image.highlight_context,&highlight_info);
     if (event.xany.window == windows->command.id)
@@ -10931,7 +10942,7 @@ static MagickBooleanType XPasteImage(Display *display,
   /*
     Update image colormap.
   */
-  XConfigureImageColormap(display,resource_info,windows,image);
+  XConfigureImageColormap(display,resource_info,windows,image,exception);
   (void) XConfigureImage(display,resource_info,windows,image,exception);
   return(MagickTrue);
 }
@@ -11344,7 +11355,7 @@ static MagickBooleanType XROIImage(Display *display,
     /*
       Wait for next event.
     */
-    XScreenEvent(display,windows,&event);
+    XScreenEvent(display,windows,&event,exception);
     if (event.xany.window == windows->command.id)
       {
         /*
@@ -11508,7 +11519,7 @@ static MagickBooleanType XROIImage(Display *display,
       /*
         Wait for next event.
       */
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       if ((highlight_info.width > 3) && (highlight_info.height > 3))
         XHighlightRectangle(display,windows->image.id,
           windows->image.highlight_context,&highlight_info);
@@ -11668,8 +11679,10 @@ static MagickBooleanType XROIImage(Display *display,
           }
           if (command_type != InfoCommand)
             {
-              XConfigureImageColormap(display,resource_info,windows,*image);
-              (void) XConfigureImage(display,resource_info,windows,*image,exception);
+              XConfigureImageColormap(display,resource_info,windows,*image,
+                exception);
+              (void) XConfigureImage(display,resource_info,windows,*image,
+                exception);
             }
           XCheckRefreshWindows(display,windows);
           XInfoWidget(display,windows,text);
@@ -11679,7 +11692,7 @@ static MagickBooleanType XROIImage(Display *display,
         }
       XHighlightRectangle(display,windows->image.id,
         windows->image.highlight_context,&highlight_info);
-      XScreenEvent(display,windows,&event);
+      XScreenEvent(display,windows,&event,exception);
       if (event.xany.window == windows->command.id)
         {
           /*
@@ -12103,7 +12116,7 @@ static MagickBooleanType XRotateImage(Display *display,
         /*
           Wait for next event.
         */
-        XScreenEvent(display,windows,&event);
+        XScreenEvent(display,windows,&event,exception);
         XHighlightLine(display,windows->image.id,
           windows->image.highlight_context,&rotate_info);
         if (event.xany.window == windows->command.id)
@@ -12321,7 +12334,7 @@ static MagickBooleanType XRotateImage(Display *display,
         /*
           Wait for next event.
         */
-        XScreenEvent(display,windows,&event);
+        XScreenEvent(display,windows,&event,exception);
         if (distance > 9)
           XHighlightLine(display,windows->image.id,
             windows->image.highlight_context,&rotate_info);
@@ -12469,7 +12482,7 @@ static MagickBooleanType XRotateImage(Display *display,
           windows->image.window_changes.width=(int) width;
           windows->image.window_changes.height=(int) height;
         }
-      XConfigureImageColormap(display,resource_info,windows,*image);
+      XConfigureImageColormap(display,resource_info,windows,*image,exception);
     }
   else
     if (((rotations % 4) == 1) || ((rotations % 4) == 3))
@@ -12659,7 +12672,8 @@ static MagickBooleanType XSaveImage(Display *display,
 %
 %  The format of the XScreenEvent function is:
 %
-%      void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
+%      void XScreenEvent(Display *display,XWindows *windows,XEvent *event,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -12670,6 +12684,7 @@ static MagickBooleanType XSaveImage(Display *display,
 %
 %    o event: Specifies a pointer to a X11 XEvent structure.
 %
+%    o exception: return any errors or warnings in this structure.
 %
 */
 
@@ -12693,7 +12708,8 @@ static int XPredicate(Display *magick_unused(display),XEvent *event,char *data)
 }
 #endif
 
-static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
+static void XScreenEvent(Display *display,XWindows *windows,XEvent *event,
+  ExceptionInfo *exception)
 {
   register int
     x,
@@ -12724,7 +12740,7 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
         }
       if (event->xbutton.window == windows->pan.id)
         {
-          XPanImage(display,windows,event);
+          XPanImage(display,windows,event,exception);
           break;
         }
       if (event->xbutton.window == windows->image.id)
@@ -12749,7 +12765,7 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
             windows->magnify.y=windows->image.y+y;
             if (windows->magnify.mapped == MagickFalse)
               (void) XMapRaised(display,windows->magnify.id);
-            XMakeMagnifyImage(display,windows);
+            XMakeMagnifyImage(display,windows,exception);
             if (event->type == ButtonRelease)
               (void) XWithdrawWindow(display,windows->info.id,
                 windows->info.screen);
@@ -12807,7 +12823,7 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
                 &window_changes);
               break;
             }
-          XMakeMagnifyImage(display,windows);
+          XMakeMagnifyImage(display,windows,exception);
           break;
         }
       break;
@@ -12828,7 +12844,7 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
       if (event->xexpose.window == windows->magnify.id)
         if (event->xexpose.count == 0)
           {
-            XMakeMagnifyImage(display,windows);
+            XMakeMagnifyImage(display,windows,exception);
             break;
           }
       break;
@@ -12848,7 +12864,8 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
       */
       (void) XLookupString((XKeyEvent *) &event->xkey,command,(int)
         sizeof(command),&key_symbol,(XComposeStatus *) NULL);
-      XMagnifyWindowCommand(display,windows,event->xkey.state,key_symbol);
+      XMagnifyWindowCommand(display,windows,event->xkey.state,key_symbol,
+        exception);
       break;
     }
     case MapNotify:
@@ -12889,7 +12906,7 @@ static void XScreenEvent(Display *display,XWindows *windows,XEvent *event)
              if (y >= (int) windows->image.height)
                y=(int) (windows->image.height-1);
             windows->magnify.y=windows->image.y+y;
-            XMakeMagnifyImage(display,windows);
+            XMakeMagnifyImage(display,windows,exception);
           }
       break;
     }
@@ -13284,7 +13301,7 @@ static Image *XTileImage(Display *display,XResourceInfo *resource_info,
       }
       windows->image.window_changes.width=(int) image->columns;
       windows->image.window_changes.height=(int) image->rows;
-      XConfigureImageColormap(display,resource_info,windows,image);
+      XConfigureImageColormap(display,resource_info,windows,image,exception);
       (void) XConfigureImage(display,resource_info,windows,image,exception);
       break;
     }
@@ -13891,7 +13908,8 @@ MagickExport MagickBooleanType XDisplayBackgroundImage(Display *display,
     Initialize Standard Colormap.
   */
   resources.colormap=SharedColormap;
-  XMakeStandardColormap(display,visual_info,&resources,image,map_info,&pixel);
+  XMakeStandardColormap(display,visual_info,&resources,image,map_info,&pixel,
+    exception);
   /*
     Graphic context superclass.
   */
@@ -14601,7 +14619,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
         display_image->magick);
     }
   XMakeStandardColormap(display,visual_info,resource_info,display_image,
-    map_info,pixel);
+    map_info,pixel,exception);
   display_image->taint=MagickFalse;
   /*
     Initialize graphic context.
@@ -15220,7 +15238,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
                 */
                 (void) XMagickCommand(display,resource_info,windows,ZoomCommand,
                   &display_image,exception);
-                XMagnifyImage(display,windows,&event);
+                XMagnifyImage(display,windows,&event,exception);
                 break;
               }
               case Button3:
@@ -15318,7 +15336,8 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
             */
             factor=XMenuWidget(display,windows,"Magnify",MagnifyMenu,command);
             if (factor >= 0)
-              XMagnifyWindowCommand(display,windows,0,MagnifyCommands[factor]);
+              XMagnifyWindowCommand(display,windows,0,MagnifyCommands[factor],
+                exception);
             break;
           }
         if (event.xbutton.window == windows->pan.id)
@@ -15343,7 +15362,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
               }
               default:
               {
-                XPanImage(display,windows,&event);
+                XPanImage(display,windows,&event,exception);
                 break;
               }
             }
@@ -15672,7 +15691,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
                 status=XMakeImage(display,resource_info,&windows->magnify,
                   display_image,windows->magnify.width,windows->magnify.height,
                   exception);
-                XMakeMagnifyImage(display,windows);
+                XMakeMagnifyImage(display,windows,exception);
               }
             break;
           }
@@ -15749,7 +15768,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
         if ((event.xexpose.window == windows->magnify.id) &&
             (windows->magnify.mapped != MagickFalse))
           {
-            XMakeMagnifyImage(display,windows);
+            XMakeMagnifyImage(display,windows,exception);
             break;
           }
         if (event.xexpose.window == windows->pan.id)
@@ -15788,7 +15807,8 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
                 &display_image,exception);
           }
         if (event.xkey.window == windows->magnify.id)
-          XMagnifyWindowCommand(display,windows,event.xkey.state,key_symbol);
+          XMagnifyWindowCommand(display,windows,event.xkey.state,key_symbol,
+            exception);
         if (event.xkey.window == windows->pan.id)
           {
             if ((key_symbol == XK_q) || (key_symbol == XK_Escape))
@@ -15857,7 +15877,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
           }
         if (event.xmap.window == windows->magnify.id)
           {
-            XMakeMagnifyImage(display,windows);
+            XMakeMagnifyImage(display,windows,exception);
             windows->magnify.mapped=MagickTrue;
             (void) XWithdrawWindow(display,windows->info.id,
               windows->info.screen);
@@ -15885,7 +15905,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
             */
             taint=display_image->taint;
             XMakeStandardColormap(display,icon_visual,icon_resources,
-              display_image,icon_map,icon_pixel);
+              display_image,icon_map,icon_pixel,exception);
             (void) XMakeImage(display,icon_resources,&windows->icon,
               display_image,windows->icon.width,windows->icon.height,
               exception);
@@ -16010,7 +16030,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
           {
             if (map_info->colormap == icon_map->colormap)
               XConfigureImageColormap(display,resource_info,windows,
-                display_image);
+                display_image,exception);
             (void) XFreeStandardColormap(display,icon_visual,icon_map,
               icon_pixel);
             windows->icon.mapped=MagickFalse;
index 1cb98042f471af799ac565f665c42723857f6ab1..e456f51ea9a04c183e034e79223beb753758ec68 100644 (file)
@@ -1380,7 +1380,12 @@ static int XScreenEvent(Display *display,XEvent *event,char *data)
         if (event->xexpose.count == 0)
           if (windows->magnify.mapped)
             {
-              XMakeMagnifyImage(display,windows);
+              ExceptionInfo
+                *exception;
+
+              exception=AcquireExceptionInfo();
+              XMakeMagnifyImage(display,windows,exception);
+              exception=DestroyExceptionInfo(exception);
               break;
             }
       if (event->xexpose.window == windows->command.id)
@@ -2356,7 +2361,8 @@ MagickPrivate void XColorBrowserWidget(Display *display,XWindows *windows,
                   /*
                     Select a pen color from the X server.
                   */
-                  (void) XGetWindowColor(display,windows,reply_info.text);
+                  (void) XGetWindowColor(display,windows,reply_info.text,
+                    exception);
                   reply_info.marker=reply_info.text;
                   reply_info.cursor=reply_info.text+Extent(reply_info.text);
                   XDrawMatteText(display,&windows->widget,&reply_info);
index 78682bcc0364e7fffb3496ffad700551c90e1d8d..7a68fe2641e4b6f5eb6bb050ac4432ac52e97a99 100644 (file)
@@ -515,8 +515,8 @@ extern MagickPrivate MagickBooleanType
   XAnnotateImage(Display *,const XPixelInfo *,XAnnotateInfo *,Image *,
     ExceptionInfo *),
   XComponentGenesis(void),
-  XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *),
-  XGetWindowColor(Display *,XWindows *,char *),
+  XDrawImage(Display *,const XPixelInfo *,XDrawInfo *,Image *,ExceptionInfo *),
+  XGetWindowColor(Display *,XWindows *,char *,ExceptionInfo *),
   XMagickProgressMonitor(const char *,const MagickOffsetType,
     const MagickSizeType,void *),
   XMakeImage(Display *,const XResourceInfo *,XWindowInfo *,Image *,unsigned int,
@@ -529,10 +529,12 @@ extern MagickPrivate void
   XCheckRefreshWindows(Display *,XWindows *),
   XClientMessage(Display *,const Window,const Atom,const Atom,const Time),
   XComponentTerminus(void),
-  XConfigureImageColormap(Display *,XResourceInfo *,XWindows *,Image *),
+  XConfigureImageColormap(Display *,XResourceInfo *,XWindows *,Image *,
+    ExceptionInfo *),
   XConstrainWindowPosition(Display *,XWindowInfo *),
   XDelay(Display *,const size_t),
-  XDisplayImageInfo(Display *,const XResourceInfo *,XWindows *,Image *,Image *),
+  XDisplayImageInfo(Display *,const XResourceInfo *,XWindows *,Image *,Image *,
+    ExceptionInfo *),
   XDestroyWindowColors(Display *,Window),
   XFreeResources(Display *,XVisualInfo *,XStandardColormap *,XPixelInfo *,
     XFontStruct *,XResourceInfo *,XWindowInfo *),
@@ -547,9 +549,9 @@ extern MagickPrivate void
   XGetMapInfo(const XVisualInfo *,const Colormap,XStandardColormap *),
   XGetWindowInfo(Display *,XVisualInfo *,XStandardColormap *,XPixelInfo *,
     XFontStruct *,XResourceInfo *,XWindowInfo *),
-  XMakeMagnifyImage(Display *,XWindows *),
+  XMakeMagnifyImage(Display *,XWindows *,ExceptionInfo *),
   XMakeStandardColormap(Display *,XVisualInfo *,XResourceInfo *,Image *,
-    XStandardColormap *,XPixelInfo *),
+    XStandardColormap *,XPixelInfo *,ExceptionInfo *),
   XMakeWindow(Display *,Window,char **,int,XClassHint *,XWMHints *,
     XWindowInfo *),
   XQueryPosition(Display *,const Window,int *,int *),
index 262fdb26f29b6b7db4b4f2ebbc84c5104a13671b..0e434908f71cf16b6cc5913f9aca69ce1906bbc2 100644 (file)
@@ -545,7 +545,7 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display,
   /*
     Initialize annotated image.
   */
-  annotate_image=AcquireImage((ImageInfo *) NULL,&image->exception);
+  annotate_image=AcquireImage((ImageInfo *) NULL,exception);
   if (annotate_image == (Image *) NULL)
     return(MagickFalse);
   annotate_image->columns=annotate_info->width;
@@ -559,14 +559,13 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display,
   y=0;
   (void) XParseGeometry(annotate_info->geometry,&x,&y,&width,&height);
   (void) GetOneVirtualPixel(image,(ssize_t) x,(ssize_t) y,virtual_pixel,
-    &image->exception);
+    exception);
   annotate_image->background_color.red=virtual_pixel[RedPixelChannel];
   annotate_image->background_color.green=virtual_pixel[GreenPixelChannel];
   annotate_image->background_color.blue=virtual_pixel[BluePixelChannel];
   annotate_image->background_color.alpha=virtual_pixel[AlphaPixelChannel];
   if (annotate_info->stencil == ForegroundStencil)
     annotate_image->matte=MagickTrue;
-  exception=(&image->exception);
   annotate_view=AcquireCacheView(annotate_image);
   for (y=0; y < (int) annotate_image->rows; y++)
   {
@@ -651,8 +650,7 @@ MagickPrivate MagickBooleanType XAnnotateImage(Display *display,
       /*
         Rotate image.
       */
-      rotate_image=
-        RotateImage(annotate_image,annotate_info->degrees,&image->exception);
+      rotate_image=RotateImage(annotate_image,annotate_info->degrees,exception);
       if (rotate_image == (Image *) NULL)
         return(MagickFalse);
       annotate_image=DestroyImage(annotate_image);
@@ -1694,7 +1692,8 @@ MagickPrivate void XComponentTerminus(void)
 %  The format of the XConfigureImageColormap method is:
 %
 %      void XConfigureImageColormap(Display *display,
-%        XResourceInfo *resource_info,XWindows *windows,Image *image)
+%        XResourceInfo *resource_info,XWindows *windows,Image *image,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -1707,9 +1706,12 @@ MagickPrivate void XComponentTerminus(void)
 %
 %    o image: the image.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 MagickPrivate void XConfigureImageColormap(Display *display,
-  XResourceInfo *resource_info,XWindows *windows,Image *image)
+  XResourceInfo *resource_info,XWindows *windows,Image *image,
+  ExceptionInfo *exception)
 {
   Colormap
     colormap;
@@ -1720,7 +1722,7 @@ MagickPrivate void XConfigureImageColormap(Display *display,
   XSetCursorState(display,windows,MagickTrue);
   XCheckRefreshWindows(display,windows);
   XMakeStandardColormap(display,windows->visual_info,resource_info,image,
-    windows->map_info,windows->pixel_info);
+    windows->map_info,windows->pixel_info,exception);
   colormap=windows->map_info->colormap;
   (void) XSetWindowColormap(display,windows->image.id,colormap);
   (void) XSetWindowColormap(display,windows->command.id,colormap);
@@ -1943,7 +1945,7 @@ MagickPrivate void XDestroyWindowColors(Display *display,Window window)
 %
 %      void XDisplayImageInfo(Display *display,
 %        const XResourceInfo *resource_info,XWindows *windows,Image *undo_image,
-%        Image *image)
+%        Image *image,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -1958,10 +1960,12 @@ MagickPrivate void XDestroyWindowColors(Display *display,Window window)
 %
 %    o image: the image.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 MagickPrivate void XDisplayImageInfo(Display *display,
   const XResourceInfo *resource_info,XWindows *windows,Image *undo_image,
-  Image *image)
+  Image *image,ExceptionInfo *exception)
 {
   char
     filename[MaxTextExtent],
@@ -2061,9 +2065,9 @@ MagickPrivate void XDisplayImageInfo(Display *display,
   /*
     Write info about the image to a file.
   */
-  (void) IdentifyImage(image,file,MagickTrue,&image->exception);
+  (void) IdentifyImage(image,file,MagickTrue,exception);
   (void) fclose(file);
-  text=FileToString(filename,~0,&image->exception);
+  text=FileToString(filename,~0,exception);
   (void) RelinquishUniqueFileResource(filename);
   if (text == (char *) NULL)
     {
@@ -2110,7 +2114,7 @@ MagickPrivate void XDisplayImageInfo(Display *display,
 %
 %  The format of the XDitherImage method is:
 %
-%      void XDitherImage(Image *image,XImage *ximage)
+%      void XDitherImage(Image *image,XImage *ximage,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -2119,8 +2123,10 @@ MagickPrivate void XDisplayImageInfo(Display *display,
 %    o ximage: Specifies a pointer to a XImage structure;  returned from
 %      XCreateImage.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
-static void XDitherImage(Image *image,XImage *ximage)
+static void XDitherImage(Image *image,XImage *ximage,ExceptionInfo *exception)
 {
   static const short int
     dither_red[2][16]=
@@ -2230,7 +2236,7 @@ static void XDitherImage(Image *image,XImage *ximage)
   for (y=0; y < (int) image->rows; y++)
   {
     p=GetCacheViewVirtualPixels(image_view,0,(ssize_t) y,image->columns,1,
-      &image->exception);
+      exception);
     if (p == (const Quantum *) NULL)
       break;
     for (x=0; x < (int) image->columns; x++)
@@ -2283,7 +2289,8 @@ static void XDitherImage(Image *image,XImage *ximage)
 %
 %  The format of the XDrawImage method is:
 %
-%    MagickBooleanType XDrawImage(display,pixel,draw_info,image)
+%    MagickBooleanType XDrawImage(Display *display,const XPixelInfo *pixel,
+%      XDrawInfo *draw_info,Image *image,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -2296,16 +2303,16 @@ static void XDitherImage(Image *image,XImage *ximage)
 %
 %    o image: the image.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 MagickPrivate MagickBooleanType XDrawImage(Display *display,
-  const XPixelInfo *pixel,XDrawInfo *draw_info,Image *image)
+  const XPixelInfo *pixel,XDrawInfo *draw_info,Image *image,
+  ExceptionInfo *exception)
 {
   CacheView
     *draw_view;
 
-  ExceptionInfo
-    *exception;
-
   GC
     draw_context;
 
@@ -2467,7 +2474,7 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display,
   /*
     Initialize draw image.
   */
-  draw_image=AcquireImage((ImageInfo *) NULL,&image->exception);
+  draw_image=AcquireImage((ImageInfo *) NULL,exception);
   if (draw_image == (Image *) NULL)
     return(MagickFalse);
   draw_image->columns=draw_info->width;
@@ -2481,15 +2488,14 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display,
   y=0;
   (void) XParseGeometry(draw_info->geometry,&x,&y,&width,&height);
   (void) GetOneVirtualPixel(image,(ssize_t) x,(ssize_t) y,virtual_pixel,
-    &image->exception);
+    exception);
   draw_image->background_color.red=virtual_pixel[RedPixelChannel];
   draw_image->background_color.green=virtual_pixel[GreenPixelChannel];
   draw_image->background_color.blue=virtual_pixel[BluePixelChannel];
   draw_image->background_color.alpha=virtual_pixel[AlphaPixelChannel];
-  if (SetImageStorageClass(draw_image,DirectClass,&image->exception) == MagickFalse)
+  if (SetImageStorageClass(draw_image,DirectClass,exception) == MagickFalse)
     return(MagickFalse);
   draw_image->matte=MagickTrue;
-  exception=(&image->exception);
   draw_view=AcquireCacheView(draw_image);
   for (y=0; y < (int) draw_image->rows; y++)
   {
@@ -2567,7 +2573,7 @@ MagickPrivate MagickBooleanType XDrawImage(Display *display,
       /*
         Rotate image.
       */
-      rotate_image=RotateImage(draw_image,draw_info->degrees,&image->exception);
+      rotate_image=RotateImage(draw_image,draw_info->degrees,exception);
       if (rotate_image == (Image *) NULL)
         return(MagickFalse);
       draw_image=DestroyImage(draw_image);
@@ -3841,7 +3847,7 @@ static Window XGetSubwindow(Display *display,Window window,int x,int y)
 %  The format of the XGetWindowColor method is:
 %
 %      MagickBooleanType XGetWindowColor(Display *display,XWindows *windows,
-%        char *name)
+%        char *name,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -3853,9 +3859,11 @@ static Window XGetSubwindow(Display *display,Window window,int x,int y)
 %    o name: the name of the color if found in the X Color Database is
 %      returned in this character string.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 MagickPrivate MagickBooleanType XGetWindowColor(Display *display,
-  XWindows *windows,char *name)
+  XWindows *windows,char *name,ExceptionInfo *exception)
 {
   int
     x,
@@ -3937,7 +3945,7 @@ MagickPrivate MagickBooleanType XGetWindowColor(Display *display,
   pixel.blue=ScaleShortToQuantum(color.blue);
   pixel.alpha=OpaqueAlpha;
   (void) QueryColorname(windows->image.image,&pixel,X11Compliance,name,
-    &windows->image.image->exception);
+    exception);
   return(MagickTrue);
 }
 \f
@@ -3961,7 +3969,8 @@ MagickPrivate MagickBooleanType XGetWindowColor(Display *display,
 %  The format of the XGetWindowImage method is:
 %
 %      Image *XGetWindowImage(Display *display,const Window window,
-%        const unsigned int borders,const unsigned int level)
+%        const unsigned int borders,const unsigned int level,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -3979,9 +3988,11 @@ MagickPrivate MagickBooleanType XGetWindowColor(Display *display,
 %      one call.  A value of one causes the function to descend the window
 %      hierarchy and overlay the target image with each subwindow image.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 static Image *XGetWindowImage(Display *display,const Window window,
-  const unsigned int borders,const unsigned int level)
+  const unsigned int borders,const unsigned int level,ExceptionInfo *exception)
 {
   typedef struct _ColormapInfo
   {
@@ -4163,7 +4174,8 @@ static Image *XGetWindowImage(Display *display,const Window window,
       if ((status == True) && (number_children != 0))
         {
           for (i=0; i < (int) number_children; i++)
-            (void) XGetWindowImage(display,children[i],MagickFalse,level+1);
+            (void) XGetWindowImage(display,children[i],MagickFalse,level+1,
+              exception);
           (void) XFree((void *) children);
         }
     }
@@ -4175,9 +4187,6 @@ static Image *XGetWindowImage(Display *display,const Window window,
       ColormapInfo
         *next;
 
-      ExceptionInfo
-        *exception;
-
       Image
         *composite_image,
         *image;
@@ -4347,7 +4356,7 @@ static Image *XGetWindowImage(Display *display,const Window window,
         /*
           Allocate image structure.
         */
-        composite_image=AcquireImage((ImageInfo *) NULL,&image->exception);
+        composite_image=AcquireImage((ImageInfo *) NULL,exception);
         if (composite_image == (Image *) NULL)
           {
             XDestroyImage(ximage);
@@ -4361,7 +4370,6 @@ static Image *XGetWindowImage(Display *display,const Window window,
           composite_image->storage_class=PseudoClass;
         composite_image->columns=(size_t) ximage->width;
         composite_image->rows=(size_t) ximage->height;
-        exception=(&composite_image->exception);
         composite_view=AcquireCacheView(composite_image);
         switch (composite_image->storage_class)
         {
@@ -4863,7 +4871,8 @@ MagickPrivate void XHighlightRectangle(Display *display,Window window,
 %
 %  The format of the XImportImage method is:
 %
-%      Image *XImportImage(const ImageInfo *image_info,XImportInfo *ximage_info)
+%      Image *XImportImage(const ImageInfo *image_info,XImportInfo *ximage_info,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -4871,9 +4880,11 @@ MagickPrivate void XHighlightRectangle(Display *display,Window window,
 %
 %    o ximage_info: Specifies a pointer to an XImportInfo structure.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 MagickExport Image *XImportImage(const ImageInfo *image_info,
-  XImportInfo *ximage_info)
+  XImportInfo *ximage_info,ExceptionInfo *exception)
 {
   Colormap
     *colormaps;
@@ -5066,7 +5077,7 @@ MagickExport Image *XImportImage(const ImageInfo *image_info,
   */
   (void) XGrabServer(display);
   image=XGetWindowImage(display,target,ximage_info->borders,
-    ximage_info->descend ? 1U : 0U);
+    ximage_info->descend ? 1U : 0U,exception);
   (void) XUngrabServer(display);
   if (image == (Image *) NULL)
     ThrowXWindowFatalException(XServerError,"UnableToReadXWindowImage",
@@ -5084,10 +5095,10 @@ MagickExport Image *XImportImage(const ImageInfo *image_info,
           /*
             Crop image as defined by the cropping rectangle.
           */
-          clone_image=CloneImage(image,0,0,MagickTrue,&image->exception);
+          clone_image=CloneImage(image,0,0,MagickTrue,exception);
           if (clone_image != (Image *) NULL)
             {
-              crop_image=CropImage(clone_image,&crop_info,&image->exception);
+              crop_image=CropImage(clone_image,&crop_info,exception);
               if (crop_image != (Image *) NULL)
                 {
                   image=DestroyImage(image);
@@ -5495,8 +5506,8 @@ MagickPrivate MagickBooleanType XMakeImage(Display *display,
           window->image->page.x=0;
           window->image->page.y=0;
           (void) ParsePageGeometry(window->image,window->crop_geometry,
-            &crop_info,&image->exception);
-          crop_image=CropImage(window->image,&crop_info,&image->exception);
+            &crop_info,exception);
+          crop_image=CropImage(window->image,&crop_info,exception);
           if (crop_image != (Image *) NULL)
             {
               if (window->image != image)
@@ -5516,11 +5527,9 @@ MagickPrivate MagickBooleanType XMakeImage(Display *display,
           */
           resize_image=NewImageList();
           if (window->pixel_info->colors != 0)
-            resize_image=SampleImage(window->image,width,height,
-              &image->exception);
+            resize_image=SampleImage(window->image,width,height,exception);
           else
-            resize_image=ThumbnailImage(window->image,width,height,
-              &image->exception);
+            resize_image=ThumbnailImage(window->image,width,height,exception);
           if (resize_image != (Image *) NULL)
             {
               if (window->image != image)
@@ -5927,11 +5936,11 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
       (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",(double)
         image->columns,(double) image->rows);
       image_info->size=ConstantString(size);
-      pattern=ReadImage(image_info,&image->exception);
+      pattern=ReadImage(image_info,exception);
       image_info=DestroyImageInfo(image_info);
       if (pattern != (Image *) NULL)
         {
-          canvas=CloneImage(image,0,0,MagickTrue,&image->exception);
+          canvas=CloneImage(image,0,0,MagickTrue,exception);
           if (canvas != (Image *) NULL)
             (void) CompositeImage(canvas,DstOverCompositeOp,pattern,0,0,
               exception);
@@ -5971,7 +5980,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
       for (y=0; y < (int) canvas->rows; y++)
       {
         p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
-          &canvas->exception);
+          exception);
         if (p == (const Quantum *) NULL)
           break;
         bit=0;
@@ -6012,7 +6021,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6064,7 +6073,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6102,13 +6111,13 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           if (resource_info->color_recovery &&
               resource_info->quantize_info->dither)
             {
-              XDitherImage(canvas,ximage);
+              XDitherImage(canvas,ximage,exception);
               break;
             }
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
@@ -6139,7 +6148,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
@@ -6174,7 +6183,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           {
             nibble=0;
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
@@ -6226,7 +6235,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6265,13 +6274,13 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
           if (resource_info->color_recovery &&
               resource_info->quantize_info->dither)
             {
-              XDitherImage(canvas,ximage);
+              XDitherImage(canvas,ximage,exception);
               break;
             }
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
@@ -6297,7 +6306,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
               for (y=0; y < (int) canvas->rows; y++)
               {
                 p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                  canvas->columns,1,&canvas->exception);
+                  canvas->columns,1,exception);
                 if (p == (const Quantum *) NULL)
                   break;
                 if ((red_gamma != 1.0) || (green_gamma != 1.0) ||
@@ -6344,7 +6353,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
                 for (y=0; y < (int) canvas->rows; y++)
                 {
                   p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                    canvas->columns,1,&canvas->exception);
+                    canvas->columns,1,exception);
                   if (p == (const Quantum *) NULL)
                     break;
                   if ((red_gamma != 1.0) || (green_gamma != 1.0) ||
@@ -6397,7 +6406,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
                 for (y=0; y < (int) canvas->rows; y++)
                 {
                   p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                    canvas->columns,1,&canvas->exception);
+                    canvas->columns,1,exception);
                   if (p == (const Quantum *) NULL)
                     break;
                   for (x=0; x < (int) canvas->columns; x++)
@@ -6429,7 +6438,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
       for (y=0; y < (int) canvas->rows; y++)
       {
         p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
-          &canvas->exception);
+          exception);
         if (p == (const Quantum *) NULL)
           break;
         bit=0;
@@ -6559,11 +6568,11 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
       (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",(double)
         image->columns,(double) image->rows);
       image_info->size=ConstantString(size);
-      pattern=ReadImage(image_info,&image->exception);
+      pattern=ReadImage(image_info,exception);
       image_info=DestroyImageInfo(image_info);
       if (pattern != (Image *) NULL)
         {
-          canvas=CloneImage(image,0,0,MagickTrue,&image->exception);
+          canvas=CloneImage(image,0,0,MagickTrue,exception);
           if (canvas != (Image *) NULL)
             (void) CompositeImage(canvas,DstOverCompositeOp,pattern,0,0,
               exception);
@@ -6603,7 +6612,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
       for (y=0; y < (int) canvas->rows; y++)
       {
         p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
-          &canvas->exception);
+          exception);
         if (p == (const Quantum *) NULL)
           break;
         bit=0;
@@ -6644,7 +6653,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6697,7 +6706,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6736,19 +6745,18 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           if (resource_info->color_recovery &&
               resource_info->quantize_info->dither)
             {
-              XDitherImage(canvas,ximage);
+              XDitherImage(canvas,ximage,exception);
               break;
             }
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
             {
-              pixel=pixels[(ssize_t)
-                GetPixelIndex(canvas,p)];
+              pixel=pixels[(ssize_t) GetPixelIndex(canvas,p)];
               *q++=(unsigned char) pixel;
               p+=GetPixelChannels(canvas);
             }
@@ -6774,7 +6782,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=0; x < (int) canvas->columns; x++)
@@ -6809,7 +6817,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6862,7 +6870,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             nibble=0;
@@ -6901,13 +6909,13 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
           if (resource_info->color_recovery &&
               resource_info->quantize_info->dither)
             {
-              XDitherImage(canvas,ximage);
+              XDitherImage(canvas,ximage,exception);
               break;
             }
           for (y=0; y < (int) canvas->rows; y++)
           {
             p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-              canvas->columns,1,&canvas->exception);
+              canvas->columns,1,exception);
             if (p == (const Quantum *) NULL)
               break;
             for (x=(int) canvas->columns-1; x >= 0; x--)
@@ -6933,7 +6941,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
               for (y=0; y < (int) canvas->rows; y++)
               {
                 p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                  canvas->columns,1,&canvas->exception);
+                  canvas->columns,1,exception);
                 if (p == (const Quantum *) NULL)
                   break;
                 if ((red_gamma != 1.0) || (green_gamma != 1.0) ||
@@ -6980,7 +6988,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
                 for (y=0; y < (int) canvas->rows; y++)
                 {
                   p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                    canvas->columns,1,&canvas->exception);
+                    canvas->columns,1,exception);
                   if (p == (const Quantum *) NULL)
                     break;
                   if ((red_gamma != 1.0) || (green_gamma != 1.0) ||
@@ -7033,7 +7041,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
                 for (y=0; y < (int) canvas->rows; y++)
                 {
                   p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,
-                    canvas->columns,1,&canvas->exception);
+                    canvas->columns,1,exception);
                   if (p == (const Quantum *) NULL)
                     break;
                   for (x=(int) canvas->columns-1; x >= 0; x--)
@@ -7065,7 +7073,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
       for (y=0; y < (int) canvas->rows; y++)
       {
         p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
-          &canvas->exception);
+          exception);
         if (p == (const Quantum *) NULL)
           break;
         bit=0;
@@ -7109,7 +7117,8 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
 %
 %  The format of the XMakeMagnifyImage method is:
 %
-%      void XMakeMagnifyImage(display,windows)
+%      void XMakeMagnifyImage(Display *display,XWindows *windows,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -7118,8 +7127,11 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
 %
 %    o windows: Specifies a pointer to a XWindows structure.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
-MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows)
+MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows,
+  ExceptionInfo *exception)
 {
   char
     tuple[MaxTextExtent];
@@ -7511,8 +7523,7 @@ MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows)
     Show center pixel color.
   */
   (void) GetOneVirtualMagickPixel(windows->image.image,(ssize_t)
-    windows->magnify.x,(ssize_t) windows->magnify.y,&pixel,
-    &windows->image.image->exception);
+    windows->magnify.x,(ssize_t) windows->magnify.y,&pixel,exception);
   (void) FormatLocaleString(tuple,MaxTextExtent,"%d,%d: ",
     windows->magnify.x,windows->magnify.y);
   (void) ConcatenateMagickString(tuple,"(",MaxTextExtent);
@@ -7543,7 +7554,7 @@ MagickPrivate void XMakeMagnifyImage(Display *display,XWindows *windows)
   (void) XDrawImageString(display,windows->magnify.pixmap,
     windows->magnify.annotate_context,x,y,tuple,(int) strlen(tuple));
   (void) QueryColorname(windows->image.image,&pixel,SVGCompliance,tuple,
-     &windows->image.image->exception);
+    exception);
   y+=height;
   (void) XDrawImageString(display,windows->magnify.pixmap,
     windows->magnify.annotate_context,x,y,tuple,(int) strlen(tuple));
@@ -7666,8 +7677,9 @@ static MagickBooleanType XMakePixmap(Display *display,
 %
 %  The format of the XMakeStandardColormap method is:
 %
-%      XMakeStandardColormap(display,visual_info,resource_info,image,
-%        map_info,pixel)
+%      void XMakeStandardColormap(Display *display,XVisualInfo *visual_info,
+%        XResourceInfo *resource_info,Image *image,XStandardColormap *map_info,
+%        XPixelInfo *pixel,ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
@@ -7686,6 +7698,8 @@ static MagickBooleanType XMakePixmap(Display *display,
 %
 %    o pixel: Specifies a pointer to a XPixelInfo structure.
 %
+%    o exception: return any errors or warnings in this structure.
+%
 */
 
 #if defined(__cplusplus) || defined(c_plusplus)
@@ -7741,14 +7755,11 @@ static inline Quantum ScaleXToQuantum(const size_t x,
 
 MagickPrivate void XMakeStandardColormap(Display *display,
   XVisualInfo *visual_info,XResourceInfo *resource_info,Image *image,
-  XStandardColormap *map_info,XPixelInfo *pixel)
+  XStandardColormap *map_info,XPixelInfo *pixel,ExceptionInfo *exception)
 {
   Colormap
     colormap;
 
-  ExceptionInfo
-    *exception;
-
   register ssize_t
     i;
 
@@ -7773,7 +7784,6 @@ MagickPrivate void XMakeStandardColormap(Display *display,
   assert(map_info != (XStandardColormap *) NULL);
   assert(resource_info != (XResourceInfo *) NULL);
   assert(pixel != (XPixelInfo *) NULL);
-  exception=(&image->exception);
   if (resource_info->map_type != (char *) NULL)
     {
       /*
@@ -7798,7 +7808,7 @@ MagickPrivate void XMakeStandardColormap(Display *display,
             /*
               Improve image appearance with error diffusion.
             */
-            affinity_image=AcquireImage((ImageInfo *) NULL,&image->exception);
+            affinity_image=AcquireImage((ImageInfo *) NULL,exception);
             if (affinity_image == (Image *) NULL)
               ThrowXWindowFatalException(ResourceLimitFatalError,
                 "UnableToDitherImage",image->filename);
index 928b63718e66918e4e898ead62432ba37f591a37..4ecd100cd2fbe3f22ef8ccf9aa6e0fde01c8d91b 100644 (file)
@@ -33,7 +33,7 @@ typedef struct _XImportInfo
 } XImportInfo;
 
 extern MagickExport Image
-  *XImportImage(const ImageInfo *,XImportInfo *);
+  *XImportImage(const ImageInfo *,XImportInfo *,ExceptionInfo *);
 
 extern MagickExport void
   XGetImportInfo(XImportInfo *);
index c87f3a0b3df93ea395ac8f11ddff7d572fa87ce9..a23f05783e85367af42c929c9b19c89501134015 100644 (file)
@@ -465,7 +465,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
         for (scene=0; scene < (size_t) MagickMax(snapshots,1); scene++)
         {
           (void) sleep(resource_info.pause);
-          images=XImportImage(image_info,&ximage_info);
+          images=XImportImage(image_info,&ximage_info,exception);
           status&=(images != (Image *) NULL) &&
             (exception->severity < ErrorException);
           if (images == (Image *) NULL)
index 2e276548e104cbb969054b3246a96cd109847061..e051a9633f3bbf2ea27567e0ca1c8794daef17a5 100644 (file)
@@ -109,7 +109,7 @@ static Image *ReadXImage(const ImageInfo *image_info,ExceptionInfo *exception)
   option=GetImageOption(image_info,"x:silent");
   if (option != (const char *) NULL)
     ximage_info.silent=IsMagickTrue(option);
-  return(XImportImage(image_info,&ximage_info));
+  return(XImportImage(image_info,&ximage_info,exception));
 }
 #endif
 \f