]> granicus.if.org Git - imagemagick/commitdiff
Added initialisation of the new min_channels field to the tiff coder.
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Feb 2018 08:48:18 +0000 (09:48 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Feb 2018 08:48:18 +0000 (09:48 +0100)
coders/tiff.c

index 6e479251e7a859261b38460bb3d656d40168495c..5bc1bc871e912ed448eea0dac7e63bc3e899d209 100644 (file)
@@ -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
 \f