Merge pull request #741 from mvorisek/patch-1

Fix gdAlphaMax limit typo
master
Pierre Joye 2021-08-27 01:23:26 +07:00 committed by GitHub
commit 0bc3170fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3543,7 +3543,7 @@ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst,
red = red >= 255.5 ? 255 : red+0.5;
blue = blue >= 255.5 ? 255 : blue+0.5;
green = green >= 255.5 ? 255 : green+0.5;
alpha = alpha >= gdAlphaMax+0.5 ? 255 : alpha+0.5;
alpha = alpha >= gdAlphaMax+0.5 ? gdAlphaMax : alpha+0.5;
gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int)red, (int)green, (int)blue, (int)alpha));
}
}