]> granicus.if.org Git - imagemagick/commitdiff
Fixed incorrect calculation.
authorDirk Lemstra <dirk@git.imagemagick.org>
Mon, 16 Apr 2018 18:45:50 +0000 (20:45 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Mon, 16 Apr 2018 18:45:50 +0000 (20:45 +0200)
coders/pnm.c

index e0f6c0ed66cdec1b248cf54531874d9bc6e7dd7c..2904c89c8f47a980693c918db9e609fdcb16beb5 100644 (file)
@@ -634,7 +634,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
         */
         (void) SetImageColorspace(image,GRAYColorspace,exception);
         quantum_type=GrayQuantum;
-        extent=3*(image->depth <= 8 ? 1 : image->depth <= 16 ? 2 : 4)*
+        extent=(image->depth <= 8 ? 1 : image->depth <= 16 ? 2 : 4)*
           image->columns;
         quantum_info=AcquireQuantumInfo(image_info,image);
         if (quantum_info == (QuantumInfo *) NULL)