diff options
Diffstat (limited to 'coders/pcl.c')
-rw-r--r-- | coders/pcl.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/coders/pcl.c b/coders/pcl.c index a200af4d3..a6e64f3da 100644 --- a/coders/pcl.c +++ b/coders/pcl.c @@ -17,7 +17,7 @@ % July 1992 % % % % % -% 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 % @@ -179,10 +179,10 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) bounding_box, page; - register char + char *p; - register ssize_t + ssize_t c; SegmentInfo @@ -331,6 +331,8 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) options=AcquireString(""); (void) FormatLocaleString(density,MagickPathExtent,"%gx%g", image->resolution.x,image->resolution.y); + if (image_info->ping != MagickFalse) + (void) FormatLocaleString(density,MagickPathExtent,"2.0x2.0"); page.width=(size_t) floor(page.width*image->resolution.x/delta.x+0.5); page.height=(size_t) floor(page.height*image->resolution.y/delta.y+0.5); (void) FormatLocaleString(options,MagickPathExtent,"-g%.20gx%.20g ",(double) @@ -384,6 +386,13 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception) { (void) CopyMagickString(image->filename,filename,MagickPathExtent); image->page=page; + if (image_info->ping != MagickFalse) + { + image->magick_columns*=image->resolution.x/2.0; + image->magick_rows*=image->resolution.y/2.0; + image->columns*=image->resolution.x/2.0; + image->rows*=image->resolution.y/2.0; + } next_image=SyncNextImageInList(image); if (next_image != (Image *) NULL) image=next_image; @@ -491,11 +500,11 @@ static size_t PCLDeltaCompressImage(const size_t length, j, replacement; - register ssize_t + ssize_t i, x; - register unsigned char + unsigned char *q; q=compress_pixels; @@ -559,10 +568,10 @@ static size_t PCLPackbitsCompressImage(const size_t length, int count; - register ssize_t + ssize_t x; - register unsigned char + unsigned char *q; ssize_t @@ -672,11 +681,11 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image, MagickOffsetType scene; - register const Quantum *p; + const Quantum *p; - register ssize_t i, x; + ssize_t i, x; - register unsigned char *q; + unsigned char *q; size_t density, @@ -863,7 +872,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image, { case 1: { - register unsigned char + unsigned char bit, byte; |