From: cristy Date: Wed, 30 May 2012 12:06:16 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5515 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdf2cb2e8150631d49dafe2a3c6c0eb0de1c50e4;p=imagemagick --- diff --git a/coders/tiff.c b/coders/tiff.c index f3efe250d..918dedfe4 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -2803,11 +2803,7 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, (void) SetImageDepth(image,8,exception); } else - { - if (IssRGBColorspace(image->colorspace) == MagickFalse) - (void) TransformImageColorspace(image,sRGBColorspace,exception); - photometric=PHOTOMETRIC_RGB; - } + photometric=PHOTOMETRIC_RGB; (void) TIFFSetField(tiff,TIFFTAG_SAMPLESPERPIXEL,3); if ((image_info->type != TrueColorType) && (image_info->type != TrueColorMatteType)) @@ -2849,6 +2845,9 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, } } } + if ((photometric == PHOTOMETRIC_RGB) && + (IssRGBColorspace(image->colorspace) == MagickFalse)) + (void) TransformImageColorspace(image,sRGBColorspace,exception); switch (image->endian) { case LSBEndian: