summaryrefslogtreecommitdiff
path: root/coders/xps.c
diff options
context:
space:
mode:
Diffstat (limited to 'coders/xps.c')
-rw-r--r--coders/xps.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/coders/xps.c b/coders/xps.c
index 86afb667d..9471cd4fd 100644
--- a/coders/xps.c
+++ b/coders/xps.c
@@ -17,7 +17,7 @@
% January 2008 %
% %
% %
-% Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
@@ -170,7 +170,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
RectangleInfo
page;
- register ssize_t
+ ssize_t
i;
unsigned long
@@ -268,6 +268,8 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
options=AcquireString("");
(void) FormatLocaleString(density,MagickPathExtent,"%gx%g",resolution.x,
resolution.y);
+ if (image_info->ping != MagickFalse)
+ (void) FormatLocaleString(density,MagickPathExtent,"2.0x2.0");
(void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",(double)
page.width,(double) page.height);
read_info=CloneImageInfo(image_info);
@@ -385,6 +387,13 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
(void) CopyMagickString(postscript_image->magick,image->magick,
MagickPathExtent);
postscript_image->page=page;
+ if (image_info->ping != MagickFalse)
+ {
+ postscript_image->magick_columns*=image->resolution.x/2.0;
+ postscript_image->magick_rows*=image->resolution.y/2.0;
+ postscript_image->columns*=image->resolution.x/2.0;
+ postscript_image->rows*=image->resolution.y/2.0;
+ }
(void) CloneImageProfiles(postscript_image,image);
(void) CloneImageProperties(postscript_image,image);
next=SyncNextImageInList(postscript_image);