From 59adcfe43c3c7e6f29ba0fcb6e855878236d9ef9 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 4 Feb 2018 09:48:18 +0100 Subject: [PATCH] Added initialisation of the new min_channels field to the tiff coder. --- coders/tiff.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.40.0