]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/animate.c
Add RobidouxSharp filter depreciate Bessel Filter and Static Gravity
[imagemagick] / MagickCore / animate.c
index 97a3df15bce75f6bcb17a9f99eaa51e0a86c737c..68c6332cdac9b7a9846f35064bc56c3754f0801d 100644 (file)
@@ -17,7 +17,7 @@
 %                                July 1992                                    %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -46,6 +46,7 @@
 #include "MagickCore/color.h"
 #include "MagickCore/color-private.h"
 #include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
 #include "MagickCore/constitute.h"
 #include "MagickCore/delegate.h"
 #include "MagickCore/exception.h"
@@ -303,7 +304,7 @@ MagickExport MagickBooleanType AnimateImages(const ImageInfo *image_info,
   if (display == (Display *) NULL)
     {
       (void) ThrowMagickException(exception,GetMagickModule(),XServerError,
-        "UnableToOpenXServer","`%s'",XDisplayName(image_info->server_name));
+        "UnableToOpenXServer","'%s'",XDisplayName(image_info->server_name));
       return(MagickFalse);
     }
   if (exception->severity != UndefinedException)
@@ -317,10 +318,8 @@ MagickExport MagickBooleanType AnimateImages(const ImageInfo *image_info,
   resource_info.immutable=MagickTrue;
   argv[0]=AcquireString(GetClientName());
   (void) XAnimateImages(display,&resource_info,argv,1,images,exception);
-  SetErrorHandler((ErrorHandler) NULL);
-  SetWarningHandler((WarningHandler) NULL);
-  SetErrorHandler((ErrorHandler) NULL);
-  SetWarningHandler((WarningHandler) NULL);
+  (void) SetErrorHandler((ErrorHandler) NULL);
+  (void) SetWarningHandler((WarningHandler) NULL);
   argv[0]=DestroyString(argv[0]);
   (void) XCloseDisplay(display);
   XDestroyResourceInfo(&resource_info);
@@ -543,8 +542,14 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       status=XSaveImage(display,resource_info,windows,*image,exception);
       if (status == MagickFalse)
         {
-          XNoticeWidget(display,windows,"Unable to write X image:",
-            (*image)->filename);
+          char
+            message[MaxTextExtent];
+
+          (void) FormatLocaleString(message,MaxTextExtent,"%s:%s",
+            exception->reason != (char *) NULL ? exception->reason : "",
+            exception->description != (char *) NULL ? exception->description :
+            "");
+          XNoticeWidget(display,windows,"Unable to save file:",message);
           break;
         }
       break;
@@ -575,7 +580,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:
@@ -882,7 +888,7 @@ MagickExport void XAnimateBackgroundImage(Display *display,
               (next->colors > (size_t) visual_info->colormap_size))
             break;
           for (i=0; i < (ssize_t) images->colors; i++)
-            if (IsPixelPacketEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
+            if (IsPixelInfoEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
               break;
           if (i < (ssize_t) images->colors)
             break;
@@ -926,7 +932,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.
   */
@@ -1504,7 +1510,7 @@ MagickExport Image *XAnimateImages(Display *display,
               (next->colors > (size_t) visual_info->colormap_size))
             break;
           for (i=0; i < (ssize_t) images->colors; i++)
-            if (IsPixelPacketEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
+            if (IsPixelInfoEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
               break;
           if (i < (ssize_t) images->colors)
             break;
@@ -1556,7 +1562,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.
   */
@@ -1923,7 +1929,9 @@ MagickExport Image *XAnimateImages(Display *display,
     /*
       Create X image.
     */
-    (void) TransformImageColorspace(image_list[scene],RGBColorspace);
+    if (IssRGBColorspace(image_list[scene]->colorspace) == MagickFalse)
+      (void) TransformImageColorspace(image_list[scene],sRGBColorspace,
+        exception);
     windows->image.pixmap=(Pixmap) NULL;
     windows->image.matte_pixmap=(Pixmap) NULL;
     if ((resource_info->map_type != (char *) NULL) ||
@@ -2629,7 +2637,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);
@@ -2737,7 +2745,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;
@@ -3030,7 +3038,7 @@ MagickExport MagickBooleanType AnimateImages(const ImageInfo *image_info,
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   (void) ThrowMagickException(exception,GetMagickModule(),MissingDelegateError,
-    "DelegateLibrarySupportNotBuiltIn","`%s' (X11)",image->filename);
+    "DelegateLibrarySupportNotBuiltIn","'%s' (X11)",image->filename);
   return(MagickFalse);
 }
 #endif