diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index 4a60878..81db934 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -764,9 +764,8 @@
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 303e798..273cdb8 100644
--- a/coders/dpx.c
+++ b/coders/dpx.c
@@ -1472,7 +1472,18 @@
/*
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);