|
43 | 43 | * If it is not working, it's not Thomas G. Lane's fault.
|
44 | 44 | */
|
45 | 45 |
|
46 |
| -/* |
| 46 | +/* |
47 | 47 | SETTING THIS ONE CAUSES STRIPED IMAGE
|
48 | 48 | to be done: solve this
|
49 | 49 | #define ORIGINAL_LIB_JPEG_REVERSE_ODD_ROWS
|
|
152 | 152 | * color space, and repeatedly splits the "largest" remaining box until we
|
153 | 153 | * have as many boxes as desired colors. Then the mean color in each
|
154 | 154 | * remaining box becomes one of the possible output colors.
|
155 |
| - * |
| 155 | + * |
156 | 156 | * The second pass over the image maps each input pixel to the closest output
|
157 | 157 | * color (optionally after applying a Floyd-Steinberg dithering correction).
|
158 | 158 | * This mapping is logically trivial, but making it go fast enough requires
|
@@ -1320,16 +1320,16 @@ pass2_no_dither (j_decompress_ptr cinfo,
|
1320 | 1320 | #else
|
1321 | 1321 | r = gdTrueColorGetRed (*inptr);
|
1322 | 1322 | g = gdTrueColorGetGreen (*inptr);
|
1323 |
| - /* |
| 1323 | + /* |
1324 | 1324 | 2.0.24: inptr must not be incremented until after
|
1325 |
| - transparency check, if any. Thanks to "Super Pikeman." |
| 1325 | + transparency check, if any. Thanks to "Super Pikeman." |
1326 | 1326 | */
|
1327 | 1327 | b = gdTrueColorGetBlue (*inptr);
|
1328 | 1328 |
|
1329 | 1329 | /* If the pixel is transparent, we assign it the palette index that
|
1330 | 1330 | * will later be added at the end of the palette as the transparent
|
1331 | 1331 | * index. */
|
1332 |
| - if ((oim->transparent >= 0) && (oim->transparent == *(inptr - 1))) |
| 1332 | + if ((oim->transparent >= 0) && (oim->transparent == *inptr)) |
1333 | 1333 | {
|
1334 | 1334 | *outptr++ = nim->colorsTotal;
|
1335 | 1335 | inptr++;
|
@@ -1795,7 +1795,7 @@ static void gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int color
|
1795 | 1795 | }
|
1796 | 1796 | } else {
|
1797 | 1797 | nim = oim;
|
1798 |
| - } |
| 1798 | + } |
1799 | 1799 | if (!oim->trueColor)
|
1800 | 1800 | {
|
1801 | 1801 | /* (Almost) nothing to do! */
|
@@ -2004,7 +2004,7 @@ static void gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int color
|
2004 | 2004 | }
|
2005 | 2005 |
|
2006 | 2006 | /* Success! Get rid of the truecolor image data. */
|
2007 |
| - if (!cimP) { |
| 2007 | + if (!cimP) { |
2008 | 2008 | oim->trueColor = 0;
|
2009 | 2009 | /* Junk the truecolor pixels */
|
2010 | 2010 | for (i = 0; i < oim->sy; i++)
|
|
0 commit comments