]> granicus.if.org Git - imagemagick/blobdiff - coders/pcl.c
Accommodate background color index in PLTE chunk
[imagemagick] / coders / pcl.c
index 7d4f602c2f011593b97cbfbfb4409bfad5b904ae..4371a275613f329dbf68bfecd519d8a7527f3cff 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  %
@@ -721,8 +721,8 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image,
   one=1;
   do
   {
-    if (IsRGBColorspace(image->colorspace) == MagickFalse)
-      (void) TransformImageColorspace(image,RGBColorspace,exception);
+    if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
+      (void) TransformImageColorspace(image,sRGBColorspace,exception);
     /*
       Initialize the printer.
     */
@@ -787,8 +787,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image,
           }
         }
     option=GetImageOption(image_info,"pcl:fit-to-page");
-    if ((option != (const char *) NULL) &&
-        (IsMagickTrue(option) != MagickFalse))
+    if (IfMagickTrue(IsStringTrue(option)))
       (void) WriteBlobString(image,"\033*r3A");
     else
       (void) WriteBlobString(image,"\033*r1A");  /* start raster graphics */