From: Dirk Lemstra Date: Thu, 27 Jun 2019 13:11:17 +0000 (+0200) Subject: Fixed writing a gray with alpha image. X-Git-Tag: 7.0.8-51~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66247691ebe137787e102c96a5c90b8349e15ec8;p=imagemagick Fixed writing a gray with alpha image. --- diff --git a/coders/psd.c b/coders/psd.c index 95f303ee0..b2fa02878 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -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,