Skip to content

Commit

Permalink
Fix gdAlphaMax limit typo
Browse files Browse the repository at this point in the history
Closes GH-7410.
  • Loading branch information
mvorisek authored and cmb69 committed Sep 23, 2021
1 parent f70aae2 commit 2c3dfe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/gd/libgd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,7 @@ void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, i
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));
}
}
Expand Down

0 comments on commit 2c3dfe5

Please sign in to comment.