]> granicus.if.org Git - imagemagick/commitdiff
Fixed writing a gray with alpha image.
authorDirk Lemstra <dirk@lemstra.org>
Thu, 27 Jun 2019 13:11:17 +0000 (15:11 +0200)
committerDirk Lemstra <dirk@lemstra.org>
Thu, 27 Jun 2019 14:49:48 +0000 (16:49 +0200)
coders/psd.c

index 95f303ee079e05ed76870e604565c5a843a98580..b2fa0287851d145e883ba69480e2f99134d66ab7 100644 (file)
@@ -2931,7 +2931,8 @@ static size_t WritePSDChannels(const PSDInfo *psd_info,
       offset_length=(next_image->rows*(psd_info->version == 1 ? 2 : 4));
     }
   size_offset+=2;
-  if (next_image->storage_class == PseudoClass)
+  if ((next_image->storage_class == PseudoClass) &&
+      (IsImageGray(next_image) == MagickFalse))
     {
       length=WritePSDChannel(psd_info,image_info,image,next_image,
         IndexQuantum,compact_pixels,rows_offset,separate,compression,