From f0a55ecf09a81500286dcbcbb8ea2a3f008d5eea Mon Sep 17 00:00:00 2001 From: cristy Date: Mon, 9 Feb 2015 23:09:01 +0000 Subject: [PATCH] --- coders/tiff.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 3c64f49b6..2c21ed28c 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1382,6 +1382,8 @@ RestoreMSCWarning value=(unsigned short) image->scene; if (TIFFGetFieldDefaulted(tiff,TIFFTAG_PAGENUMBER,&value,&pages) == 1) image->scene=value; + if ((image->storage_class == PseudoClass) && (image->matte == MagickFalse)) + image->depth=GetImageDepth(image,exception); if (image_info->ping != MagickFalse) { if (image_info->number_scenes != 0) @@ -1917,11 +1919,12 @@ RestoreMSCWarning q+=GetPixelChannels(image)*(image->columns-1); for (x=0; x < (ssize_t) image->columns; x++) { - SetPixelRed(image,ScaleCharToQuantum((unsigned char) TIFFGetR(*p)),q); + SetPixelRed(image,ScaleCharToQuantum((unsigned char) + TIFFGetR(*p)),q); SetPixelGreen(image,ScaleCharToQuantum((unsigned char) TIFFGetG(*p)),q); - SetPixelBlue(image,ScaleCharToQuantum((unsigned char) TIFFGetB(*p)), - q); + SetPixelBlue(image,ScaleCharToQuantum((unsigned char) + TIFFGetB(*p)),q); if (image->alpha_trait != UndefinedPixelTrait) SetPixelAlpha(image,ScaleCharToQuantum((unsigned char) TIFFGetA(*p)),q); @@ -1955,8 +1958,6 @@ RestoreMSCWarning if (bits_per_sample == 1) image->type=BilevelType; } - if (image->storage_class == PseudoClass) - image->depth=GetImageDepth(image,exception); /* Proceed to next image. */ -- 2.40.0