From: Cristy Date: Sun, 19 Aug 2018 11:07:50 +0000 (-0400) Subject: Support printsize.{x,y} properties X-Git-Tag: 7.0.8-11~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c9b53fc98e0ef5919394678fa8d11a7f561ab83;p=imagemagick Support printsize.{x,y} properties --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 65642be00..0b8be369d 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -3106,6 +3106,20 @@ MagickExport const char *GetMagickProperty(ImageInfo *image_info, } } #endif + if (LocaleCompare("printsize.x",property) == 0) + { + WarnNoImageReturn("\"%%[%s]\"",property); + (void) FormatLocaleString(value,MagickPathExtent,"%.*g", + GetMagickPrecision(),image->colors/image->resolution.x); + break; + } + if (LocaleCompare("printsize.y",property) == 0) + { + WarnNoImageReturn("\"%%[%s]\"",property); + (void) FormatLocaleString(value,MagickPathExtent,"%.*g", + GetMagickPrecision(),image->rows/image->resolution.y); + break; + } if (LocaleCompare("profiles",property) == 0) { const char