]> granicus.if.org Git - imagemagick/blobdiff - coders/uil.c
(no commit message)
[imagemagick] / coders / uil.c
index 7a86a5904e634afce40216e9118c262fda3dfb4a..978b465b3519d92c3dfda9025060f764d62550fb 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  %
@@ -174,12 +174,12 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
     status,
     transparent;
 
-  PixelInfo
-    pixel;
-
   MagickSizeType
     number_pixels;
 
+  PixelInfo
+    pixel;
+
   register const Quantum
     *p;
 
@@ -214,7 +214,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
   if (status == MagickFalse)
     return(status);
   if (IsRGBColorspace(image->colorspace) == MagickFalse)
-    (void) TransformImageColorspace(image,RGBColorspace);
+    (void) TransformImageColorspace(image,sRGBColorspace,exception);
   transparent=MagickFalse;
   i=0;
   p=(const Quantum *) NULL;
@@ -303,7 +303,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
     /*
       Define UIL color.
     */
-    SetPixelInfoPacket(image,image->colormap+i,&pixel);
+    pixel=image->colormap[i];
     pixel.colorspace=RGBColorspace;
     pixel.depth=8;
     pixel.alpha=(MagickRealType) OpaqueAlpha;
@@ -329,7 +329,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
     else
       (void) FormatLocaleString(buffer,MaxTextExtent,
         "    color('%s',%s) = '%s'",name,
-        GetPixelPacketIntensity(image->colormap+i) <
+        GetPixelInfoIntensity(image->colormap+i) <
         ((Quantum) QuantumRange/2) ? "background" : "foreground",symbol);
     (void) WriteBlobString(image,buffer);
     (void) FormatLocaleString(buffer,MaxTextExtent,"%s",