]> granicus.if.org Git - imagemagick/blobdiff - coders/fax.c
(no commit message)
[imagemagick] / coders / fax.c
index 665b2e4ef14d93d70bd7e6e5f407fdb2e84a9527..50ef1dc94ad12946f694c8a1b084667be6215bfb 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2013 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  %
@@ -167,9 +167,9 @@ static Image *ReadFAXImage(const ImageInfo *image_info,ExceptionInfo *exception)
   /*
     Monochrome colormap.
   */
-  image->colormap[0].red=(Quantum) QuantumRange;
-  image->colormap[0].green=(Quantum) QuantumRange;
-  image->colormap[0].blue=(Quantum) QuantumRange;
+  image->colormap[0].red=QuantumRange;
+  image->colormap[0].green=QuantumRange;
+  image->colormap[0].blue=QuantumRange;
   image->colormap[1].red=(Quantum) 0;
   image->colormap[1].green=(Quantum) 0;
   image->colormap[1].blue=(Quantum) 0;
@@ -331,8 +331,7 @@ static MagickBooleanType WriteFAXImage(const ImageInfo *image_info,Image *image,
     /*
       Convert MIFF to monochrome.
     */
-    if ((IssRGBColorspace(image->colorspace) == MagickFalse) &&
-        (IsImageGray(image,exception) == MagickFalse))
+    if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse)
       (void) TransformImageColorspace(image,sRGBColorspace,exception);
     status=HuffmanEncodeImage(write_info,image,image,exception);
     if (GetNextImageInList(image) == (Image *) NULL)