ID:               26144
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sprice at wisc dot edu
-Status:           Open
+Status:           Closed
 Bug Type:         GD related
 Operating System: Mac 10.3
 PHP Version:      4.3.4
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2003-11-05 17:52:49] sprice at wisc dot edu

Description:
------------
ImageRotate() is messing with my alpha channel. Examples 
to follow.

Reproduce code:
---------------
<?php
header( 'Content-type: image/png' );
$img = ImageCreate(100, 60);

$white = ImageColorResolve($img, 255, 255, 255);
$almost_clear = ImageColorResolveAlpha($img, 1, 1, 250, 63);

ImageFilledRectangle($img, 0, 0, 50, 30, $white);
ImageFilledRectangle($img, 10, 10, 100, 60, $almost_clear);

ImagePNG($img); // This works
//ImagePNG(ImageRotate($img, 90, $almost_clear)); // This is all black
?>

Expected result:
----------------
When you run this as is, you get a semitransparent blue 
rectangle.

Actual result:
--------------
If you replace the commented out ImagePNG() 
with the commented one, the alpha channel inverts 
itself. As you increase the transparency of 
$almost_clear, it becomes black (in contrast to the non-
ImageRotate() 
line).


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26144&edit=1

Reply via email to