![]() |
sponsored links |
|
|
sponsored links
|
|
|
2
7th May 15:01
External User
Posts: 1
|
ID: 36050
Updated by: sniper@php.net Reported By: phpbug at phpandmore dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Windows NT LAPTOP 5.1 build 2600 PHP Version: 5.1.2 New Comment: RTFM: $image=imagecreatetruecolor... Previous Comments: ------------------------------------------------------------------------ [2006-01-17 14:44:12] phpbug at phpandmore dot com Description: ------------ When I try to allocate a transparent color as the background of an image, eg: the first color allocated, imagecolorallocatealpha returns false. I am using php 5.1.1, and gd bundled 2.0.28 compatable Reproduce code: --------------- $baseImage = imagecreate($_REQUEST['width'], $_REQUEST['height']); if($trans = imagecolorallocatealpha($baseImage, 255, 255, 255, 63)) echo 'good'; else echo 'bad'; Expected result: ---------------- good Actual result: -------------- bad ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36050&edit=1 |
|
|
3
7th May 15:01
External User
Posts: 1
|
ID: 36050
Updated by: pajoye@php.net Reported By: phpbug at phpandmore dot com -Status: Bogus +Status: Verified Bug Type: GD related Operating System: Windows NT LAPTOP 5.1 build 2600 PHP Version: 5.1.2 -Assigned To: +Assigned To: pajoye New Comment: Something is wrong, not in GD but in the casting ops. Previous Comments: ------------------------------------------------------------------------ [2006-01-17 15:52:05] sniper@php.net RTFM: $image=imagecreatetruecolor... ------------------------------------------------------------------------ [2006-01-17 14:44:12] phpbug at phpandmore dot com Description: ------------ When I try to allocate a transparent color as the background of an image, eg: the first color allocated, imagecolorallocatealpha returns false. I am using php 5.1.1, and gd bundled 2.0.28 compatable Reproduce code: --------------- $baseImage = imagecreate($_REQUEST['width'], $_REQUEST['height']); if($trans = imagecolorallocatealpha($baseImage, 255, 255, 255, 63)) echo 'good'; else echo 'bad'; Expected result: ---------------- good Actual result: -------------- bad ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36050&edit=1 |
|
|
4
7th May 15:01
External User
Posts: 1
|
ID: 36050
Updated by: pajoye@php.net Reported By: phpbug at phpandmore dot com -Status: Verified +Status: Assigned Bug Type: GD related Operating System: Windows NT LAPTOP 5.1 build 2600 PHP Version: 5.1.2 Assigned To: pajoye Previous Comments: ------------------------------------------------------------------------ [2006-01-17 16:11:38] pajoye@php.net Something is wrong, not in GD but in the casting ops. ------------------------------------------------------------------------ [2006-01-17 15:52:05] sniper@php.net RTFM: $image=imagecreatetruecolor... ------------------------------------------------------------------------ [2006-01-17 14:44:12] phpbug at phpandmore dot com Description: ------------ When I try to allocate a transparent color as the background of an image, eg: the first color allocated, imagecolorallocatealpha returns false. I am using php 5.1.1, and gd bundled 2.0.28 compatable Reproduce code: --------------- $baseImage = imagecreate($_REQUEST['width'], $_REQUEST['height']); if($trans = imagecolorallocatealpha($baseImage, 255, 255, 255, 63)) echo 'good'; else echo 'bad'; Expected result: ---------------- good Actual result: -------------- bad ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36050&edit=1 |
|
|
5
7th May 15:01
External User
Posts: 1
|
ID: 36050
Updated by: pajoye@php.net Reported By: phpbug at phpandmore dot com -Status: Assigned +Status: Feedback Bug Type: GD related Operating System: Windows NT LAPTOP 5.1 build 2600 PHP Version: 5.1.2 Assigned To: pajoye New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Fixed in cvs. You can now use ($trans === FALSE) Note the "===" usage, zero being a perfectly valid color index, you have to check for both the type and the value (bool and false). Previous Comments: ------------------------------------------------------------------------ [2006-01-17 16:11:38] pajoye@php.net Something is wrong, not in GD but in the casting ops. ------------------------------------------------------------------------ [2006-01-17 15:52:05] sniper@php.net RTFM: $image=imagecreatetruecolor... ------------------------------------------------------------------------ [2006-01-17 14:44:12] phpbug at phpandmore dot com Description: ------------ When I try to allocate a transparent color as the background of an image, eg: the first color allocated, imagecolorallocatealpha returns false. I am using php 5.1.1, and gd bundled 2.0.28 compatable Reproduce code: --------------- $baseImage = imagecreate($_REQUEST['width'], $_REQUEST['height']); if($trans = imagecolorallocatealpha($baseImage, 255, 255, 255, 63)) echo 'good'; else echo 'bad'; Expected result: ---------------- good Actual result: -------------- bad ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36050&edit=1 |
|
|