diff options
Diffstat (limited to 'coders/art.c')
-rw-r--r-- | coders/art.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/coders/art.c b/coders/art.c index 1872dc728..834d3828b 100644 --- a/coders/art.c +++ b/coders/art.c @@ -17,7 +17,7 @@ % July 1992 % % % % % -% Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization % +% Copyright 1999-2019 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 % @@ -97,6 +97,9 @@ static MagickBooleanType */ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) { + const unsigned char + *pixels; + Image *image; @@ -113,9 +116,6 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) count, y; - unsigned char - *pixels; - /* Open image file. */ @@ -157,25 +157,22 @@ static Image *ReadARTImage(const ImageInfo *image_info,ExceptionInfo *exception) if (quantum_info == (QuantumInfo *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); length=GetQuantumExtent(image,quantum_info,GrayQuantum); - pixels=GetQuantumPixels(quantum_info); for (y=0; y < (ssize_t) image->rows; y++) { - const void - *stream; - register Quantum *magick_restrict q; q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); if (q == (Quantum *) NULL) break; - stream=ReadBlobStream(image,length,pixels,&count); + pixels=(const unsigned char *) ReadBlobStream(image,length, + GetQuantumPixels(quantum_info),&count); if (count != (ssize_t) length) break; (void) ImportQuantumPixels(image,(CacheView *) NULL,quantum_info, - GrayQuantum,(unsigned char *) stream,exception); - stream=ReadBlobStream(image,(size_t) (-(ssize_t) length) & 0x01,pixels, - &count); + GrayQuantum,pixels,exception); + pixels=(const unsigned char *) ReadBlobStream(image,(size_t) (-(ssize_t) + length) & 0x01,GetQuantumPixels(quantum_info),&count); if (SyncAuthenticPixels(image,exception) == MagickFalse) break; if (SetImageProgress(image,LoadImageTag,y,image->rows) == MagickFalse) |