ID:               32921
 Comment by:       test at test dot com
 Reported By:      eckounlimited at gmx dot nnet
 Status:           No Feedback
 Bug Type:         GD related
 Operating System: *
 PHP Version:      5CVS-2005-05-02 (dev)
 Assigned To:      pajoye
 New Comment:

consider this as a bug or just gd's weaknessess:

- imagerotate is not alpha-able
- any animation picture (gif) is not properly rotated and not
alpha-able too

need to upgrade this function


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

[2005-05-14 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-05-06 18:56:03] [EMAIL PROTECTED]

Hi,

Partially fixed in CVS, will commit asap the definitive fix, keeping
BC.

--Pierre

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

[2005-05-06 03:17:40] [EMAIL PROTECTED]

Are you using bundled gd library or external one?
(what do you pass to --with-gd configure option?)


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

[2005-05-03 08:44:10] eckounlimited at gmx dot nnet

Description:
------------
Imagerotate between -45 an 45 degree including an alphachannel is no
problem! 46 to -44 ist still replacing the background with black.
Ohh i forgot: If you rotate, you have to specify an backgroundcolor by
imagecolorallocatealpha(!) and set imagealphablending to false and
imagesavealpha to true to get an transparent rotated png...

Reproduce code:
---------------
<?PHP
$rot = 35;
$i = imagecreatetruecolor(300,300);
imagealphablending($i, FALSE);
imagesavealpha($i,TRUE);
$whitetrans = imagecolorexactalpha($i,255,255,255,127);
imagefilledrectangle($i,0,0,200,200,$whitetrans);
$o = imagecreatefrompng("./rotate.png");
$o = imagerotate($o,$rot,$whitetrans,0);
imagecopyresampled($i,$o,0,0,0,0,300,300,300,300);
imagepng($i,"test".$rot.".png");
?>

Expected result:
----------------
This works fine and copys a transparent PNG with 35 degree to the new
test.png.
If you change now $rot = 35 to $rot = 46 the rotated png will appear on
an black background.



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


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

Reply via email to