diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3540,10 +3540,10 @@ BGD_DECLARE(void) gdImageCopyResampled (gdImagePtr dst, blue /= alpha_sum; } /* Round up closest next channel value and clamp to max channel value */ - 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; + 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; gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int)red, (int)green, (int)blue, (int)alpha)); } } |