ID: 26144
User updated by: sprice at wisc dot edu
Reported By: sprice at wisc dot edu
-Status: Feedback
+Status: Open
Bug Type: GD related
Operating System: Mac 10.3
PHP Version: 4.3.4
New Comment:
./configure --with-apxs --with-mysql --with-gd --with-
png-dir=/usr/local --with-zlib-dir=/usr --with-jpeg-
dir=/usr/local --disable-short-tags
(and phpinfo() says it is the bundled, 2.0.15 compat.
version)
Is this not reproducible?
Previous Comments:
------------------------------------------------------------------------
[2003-11-05 21:39:11] sniper@php.net
And what might have been the configure line you used?
If you didn't use the bundled GD library, bogus this yourself..
------------------------------------------------------------------------
[2003-11-05 19:46:04] sprice at wisc dot edu
Tried it with latest/greatest CVS (php4-STABLE
-200311060030) and it is still broken.
------------------------------------------------------------------------
[2003-11-05 17:55:24] iliaa@php.net
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.
------------------------------------------------------------------------
[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