summaryrefslogtreecommitdiff
path: root/coders/jpeg.c
diff options
context:
space:
mode:
authorCristy <urban-warrior@imagemagick.org>2018-04-21 10:17:08 -0400
committerCristy <urban-warrior@imagemagick.org>2018-04-21 10:17:35 -0400
commit4169084c0da0c4afe0d2e1d2087d957cb66f512e (patch)
tree7c4caaa0c9576c1cf4a538e18c0058e3b2097404 /coders/jpeg.c
parent8781ccf7720ab068e59d3943217c0f56bc004684 (diff)
downloadImageMagick-4169084c0da0c4afe0d2e1d2087d957cb66f512e.tar.gz
Get a group by ID
Diffstat (limited to 'coders/jpeg.c')
-rw-r--r--coders/jpeg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/coders/jpeg.c b/coders/jpeg.c
index efff0427d..d2d073a11 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -1473,8 +1473,11 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
if (jpeg_info.output_components == 1)
for (x=0; x < (ssize_t) image->columns; x++)
{
- index=(Quantum) ConstrainColormapIndex(image,(ssize_t) GETJSAMPLE(*p),
- exception);
+ ssize_t
+ pixel;
+
+ pixel=(ssize_t) GETJSAMPLE(*p);
+ index=(Quantum) ConstrainColormapIndex(image,pixel,exception);
SetPixelIndex(image,index,q);
SetPixelViaPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;