From: Dirk Lemstra Date: Sun, 4 Feb 2018 08:48:18 +0000 (+0100) Subject: Added initialisation of the new min_channels field to the tiff coder. X-Git-Tag: 7.0.7-23~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59adcfe43c3c7e6f29ba0fcb6e855878236d9ef9;p=imagemagick Added initialisation of the new min_channels field to the tiff coder. --- diff --git a/coders/tiff.c b/coders/tiff.c index 6e479251e..5bc1bc871 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -293,7 +293,12 @@ static void InitPSDInfo(const Image *image, PSDInfo *info) if (image->storage_class == PseudoClass) info->mode=2; // indexed mode else - info->channels=(unsigned short) image->number_channels; + { + info->channels=(unsigned short) image->number_channels; + info->min_channels=info->channels; + if (image->alpha_trait == BlendPixelTrait) + info->min_channels--; + } } #endif