From b79a830a85b0cce2e67b7f819f0f215cf173abb5 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 27 Jan 2019 12:13:48 +0100 Subject: [PATCH] Set the orientation only once. --- coders/tiff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.40.0