Browse Source

Fix for bug #45030

experimental/first_unicode_implementation
Rasmus Lerdorf 18 years ago
parent
commit
f5dc937a0d
  1. 1
      ext/gd/libgd/gd.c
  2. 7
      ext/gd/libgd/gd_png.c

1
ext/gd/libgd/gd.c

@ -2613,6 +2613,7 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i
green /= spixels;
blue /= spixels;
alpha /= spixels;
alpha += 0.5;
}
if ( alpha_sum != 0.0f) {
if( contrib_sum != 0.0f) {

7
ext/gd/libgd/gd_png.c

@ -689,7 +689,12 @@ void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilte
*/
a = gdTrueColorGetAlpha(thisPixel);
/* Andrew Hull: >> 6, not >> 7! (gd 2.0.5) */
*pOutputRow++ = 255 - ((a << 1) + (a >> 6));
if (a == 127) {
*pOutputRow++ = 0;
} else {
*pOutputRow++ = 255 - ((a << 1) + (a >> 6));
}
}
}
}

Loading…
Cancel
Save