mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fix for bug #45030
This commit is contained in:
parent
bc8defa547
commit
f5dc937a0d
@ -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) {
|
||||
|
@ -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…
Reference in New Issue
Block a user