Bug #53580 [Opn->Asn]: During resize gdImageCopyResampled cause colors change

From: Date: Sun, 29 May 2011 16:38:50 +0000
Subject: Bug #53580 [Opn->Asn]: During resize gdImageCopyResampled cause colors change
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161036@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53580&edit=1 ID: 53580 Updated by: felipe@php.net Reported by: chupakabr at gmail dot com Summary: During resize gdImageCopyResampled cause colors change -Status: Open +Status: Assigned Type: Bug Package: GD related Operating System: Windows, Ubuntu, CentOS, any? PHP Version: 5.2.16 -Assigned To: +Assigned To: pajoye Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2010-12-20 09:45:26] chupakabr at gmail dot com Description: ------------ Reproduce: To test resize image containing solid white background. After resize pixels with color different from #FFFFFF will appear. Probable cause: gdImageSetPixel parameters (red, green, blue, alpha) are casted to int in gdImageCopyResampled which cause them to floor so 254.9999999 became 254 instead of 255. Issues seem to be related: http://bugs.php.net/bug.php?id=30591 http://bugs.php.net/bug.php?id=41820 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53580&edit=1

« previous php.bugs (#161036) next »