diff options
-rw-r--r-- | image/jpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/image/jpeg.c b/image/jpeg.c index 21d3773f7..ec2e62899 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -123,6 +123,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) rowstride = bitmap_get_rowstride(bitmap); do { + int i; JSAMPROW scanlines[1]; scanlines[0] = (JSAMPROW) (pixels + rowstride * cinfo.output_scanline); @@ -130,7 +131,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) #if RGB_RED != 0 || RGB_GREEN != 1 || RGB_BLUE != 2 || RGB_PIXELSIZE != 4 /* expand to RGBA */ - for (int i = width - 1; 0 <= i; i--) { + for (i = width - 1; 0 <= i; i--) { int r = scanlines[0][i * RGB_PIXELSIZE + RGB_RED]; int g = scanlines[0][i * RGB_PIXELSIZE + RGB_GREEN]; int b = scanlines[0][i * RGB_PIXELSIZE + RGB_BLUE]; |