Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #36050 : imagecolorallocatealpha returns false
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 7th May 15:00
php-bugs
External User
 
Posts: 1
Default #36050 : imagecolorallocatealpha returns false



From: phpbug at phpandmore dot com
Operating system: Windows NT LAPTOP 5.1 build 2600
PHP version: 5.1.2
PHP Bug Type: GD related
Bug description: imagecolorallocatealpha returns false

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 bug report at http://bugs.php.net/?id=36050&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36050&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36050&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36050&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36050&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36050&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36050&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36050&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36050&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36050&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36050&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36050&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36050&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36050&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36050&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36050&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36050&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36050&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36050&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36050&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36050&r=mysqlcfg
  Reply With Quote


  sponsored links


2 7th May 15:01
External User
 
Posts: 1
Default #36050 : imagecolorallocatealpha returns false



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
  Reply With Quote
3 7th May 15:01
External User
 
Posts: 1
Default #36050 : imagecolorallocatealpha returns false


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
  Reply With Quote
4 7th May 15:01
External User
 
Posts: 1
Default #36050 : imagecolorallocatealpha returns false


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
  Reply With Quote
5 7th May 15:01
External User
 
Posts: 1
Default #36050 : imagecolorallocatealpha returns false


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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666