From: Dirk Lemstra Date: Sun, 27 Jan 2019 11:13:48 +0000 (+0100) Subject: Set the orientation only once. X-Git-Tag: 7.0.8-25~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b79a830a85b0cce2e67b7f819f0f215cf173abb5;p=imagemagick Set the orientation only once. --- diff --git a/coders/tiff.c b/coders/tiff.c index ef33e4cf5..f5d81b35c 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -3813,7 +3813,6 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, default: break; } - (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); (void) TIFFSetField(tiff,TIFFTAG_PLANARCONFIG,PLANARCONFIG_CONTIG); if (photometric == PHOTOMETRIC_RGB) if ((image_info->interlace == PlaneInterlace) || @@ -4027,6 +4026,8 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, } if (image->orientation != UndefinedOrientation) (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,(uint16) image->orientation); + else + (void) TIFFSetField(tiff,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); TIFFSetProfiles(tiff,image); { uint16