]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/66
authorCristy <urban-warrior@imagemagick.org>
Tue, 29 Dec 2015 19:08:57 +0000 (14:08 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 29 Dec 2015 19:08:57 +0000 (14:08 -0500)
coders/tiff.c

index 3937e85025e44ebe32abddbcb8553dfb0efd5d9a..e2dfcee36c6c67e1ca45b3836ed4488231808524 100755 (executable)
@@ -3361,15 +3361,9 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info,
                   MagickFalse ? PHOTOMETRIC_MINISWHITE :
                   PHOTOMETRIC_MINISBLACK);
                 (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,1);
-                if ((image_info->depth == 0) &&
-                    (image->alpha_trait == UndefinedPixelTrait) &&
-                    (SetImageMonochrome(image,exception) != MagickFalse))
-                  {
-                    status=SetQuantumDepth(image,quantum_info,1);
-                    if (status == MagickFalse)
-                      ThrowWriterException(ResourceLimitError,
-                        "MemoryAllocationFailed");
-                  }
+                if ((image->depth == 1) &&
+                    (image->alpha_trait == UndefinedPixelTrait))
+                  SetImageMonochrome(image,exception);
               }
             else
               if (image->storage_class == PseudoClass)