]> granicus.if.org Git - imagemagick/blobdiff - coders/xbm.c
(no commit message)
[imagemagick] / coders / xbm.c
index fc37238e043288ff0c02207c10d427ec1190cb54..959442533fa806bf65b74a2cf17d4680f6369811 100644 (file)
 %                  Read/Write X Windows System Bitmap Format                  %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 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  %
@@ -511,10 +511,7 @@ static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image,
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception);
   if (status == MagickFalse)
     return(status);
-  if ((IssRGBColorspace(image->colorspace) == MagickFalse) &&
-      (IsRGBColorspace(image->colorspace) == MagickFalse) &&
-      (IsImageGray(image,exception) == MagickFalse))
-    (void) TransformImageColorspace(image,sRGBColorspace,exception);
+  (void) TransformImageColorspace(image,sRGBColorspace,exception);
   /*
     Write X bitmap header.
   */
@@ -549,7 +546,7 @@ static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image,
     for (x=0; x < (ssize_t) image->columns; x++)
     {
       byte>>=1;
-      if (GetPixelIntensity(image,p) < (QuantumRange/2))
+      if (GetPixelLuma(image,p) < (QuantumRange/2))
         byte|=0x80;
       bit++;
       if (bit == 8)