My proposal for solving this issue is extending the ImageMagick Escapes and adding a %[orientation] property.
Code: Select all
--- ImageMagick-6.7.6-1/magick/property.c 2012-03-17 17:25:15.000000000 +0100
+++ ImageMagick-6.7.6-1_mod/magick/property.c 2012-04-01 14:46:53.122072396 +0200
@@ -2352,6 +2352,12 @@
"true",MaxTextExtent);
break;
}
+ if (LocaleNCompare("orientation",property,11) == 0)
+ {
+ (void) FormatLocaleString(value,MaxTextExtent,"%s",
+ CommandOptionToMnemonic(MagickOrientationOptions,(ssize_t) image->orientation));
+ break;
+ }
if (LocaleNCompare("output",property,6) == 0)
{
(void) CopyMagickString(value,image_info->filename,MaxTextExtent);