From e7820580363f4dad29eb23e3062248a703df122c Mon Sep 17 00:00:00 2001 From: cristy Date: Tue, 1 Jan 2013 23:42:55 +0000 Subject: [PATCH] --- MagickCore/identify.c | 5 ++--- coders/dpx.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/MagickCore/identify.c b/MagickCore/identify.c index 4a6087816..81db9341c 100644 --- a/MagickCore/identify.c +++ b/MagickCore/identify.c @@ -764,9 +764,8 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file, MagickCompressOptions,(ssize_t) image->compression)); if (image->quality != UndefinedCompressionQuality) (void) FormatLocaleFile(file," Quality: %.20g\n",(double) image->quality); - (void) FormatLocaleFile(file," Orientation: %s (%.20g)\n", - CommandOptionToMnemonic(MagickOrientationOptions,(ssize_t) - image->orientation),(double) image->orientation); + (void) FormatLocaleFile(file," Orientation: %s\n",CommandOptionToMnemonic( + MagickOrientationOptions,(ssize_t) image->orientation)); if (image->montage != (char *) NULL) (void) FormatLocaleFile(file," Montage: %s\n",image->montage); if (image->directory != (char *) NULL) diff --git a/coders/dpx.c b/coders/dpx.c index 303e79814..273cdb88f 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -1472,7 +1472,18 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image, /* Write image header. */ - dpx.image.orientation=0x00; /* left-to-right; top-to-bottom */ + switch (image->orientation) + { + default: + case TopLeftOrientation: dpx.image.orientation=0; break; + case TopRightOrientation: dpx.image.orientation=1; break; + case BottomLeftOrientation: dpx.image.orientation=2; break; + case BottomRightOrientation: dpx.image.orientation=3; break; + case LeftTopOrientation: dpx.image.orientation=4; break; + case RightTopOrientation: dpx.image.orientation=5; break; + case LeftBottomOrientation: dpx.image.orientation=6; break; + case RightBottomOrientation: dpx.image.orientation=7; break; + } offset+=WriteBlobShort(image,dpx.image.orientation); dpx.image.number_elements=1; offset+=WriteBlobShort(image,dpx.image.number_elements); -- 2.40.0