From: Cristy Date: Sat, 22 Sep 2018 00:42:05 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-12~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9595dd24146229318454c4db276aa534fc8c5f3;p=imagemagick ... --- diff --git a/coders/tga.c b/coders/tga.c index ad6a583ff..464ab4643 100644 --- a/coders/tga.c +++ b/coders/tga.c @@ -724,7 +724,8 @@ static MagickBooleanType WriteTGAImage(const ImageInfo *image_info,Image *image, compression; const char - *comment; + *comment, + *value; const double midpoint = QuantumRange/2.0; @@ -845,6 +846,19 @@ static MagickBooleanType WriteTGAImage(const ImageInfo *image_info,Image *image, if ((image->orientation == TopLeftOrientation) || (image->orientation == TopRightOrientation)) tga_info.attributes|=(1UL << 5); + value=GetImageArtifact(image,"tga:image-origin"); /* deprecated */ + if (value != (const char *) NULL) + { + OrientationType + origin; + + origin=(OrientationType) ParseCommandOption(MagickOrientationOptions, + MagickFalse,value); + if (origin == BottomRightOrientation || origin == TopRightOrientation) + tga_info.attributes|=(1UL << 4); + if (origin == TopLeftOrientation || origin == TopRightOrientation) + tga_info.attributes|=(1UL << 5); + } /* Write TGA header. */