php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53580
Patch gd.c revision 2010-12-21 20:29 UTC by chupakabr at gmail dot com
Patch Round revision 2010-12-20 21:31 UTC by chupakabr at gmail dot com

Patch gd.c for GD related Bug #53580

Patch version 2010-12-21 20:29 UTC

Return to Bug #53580 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: chupakabr@gmail.com

Index: gd.c
===================================================================
--- gd.c	(revision 306524)
+++ gd.c	(working copy)
@@ -2649,7 +2649,7 @@
 			if (alpha > gdAlphaMax) {
 				alpha = gdAlphaMax;
 			}
-			gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int) red, (int) green, (int) blue, (int) alpha));
+			gdImageSetPixel(dst, x, y, gdTrueColorAlpha (lround(red), lround(green), lround(blue), lround(alpha));
 		}
 	}
 }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC