note 40077 added to function.imagerotate
| From: | delobelle at blueyonder dot co dot uk | Date: | Fri, 20 Feb 2004 21:46:41 +0000 |
| Subject: | note 40077 added to function.imagerotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65462@lists.php.net to get a copy of this message | ||
Feature?
Rotated images seem to forget the alpha channel of the original image. What's the logic in
that?
For instance if img.png is a square image which is transparent then
<?php
$img = imagecreatefrompng("img.png");
$anycolor = // whatever color you like
$rot = imagerotate($img, 90, $anycolor);
imagesavealpha($rot, true);
imagepng($rot);
?>
outputs a black square.
So is there a way to rotate an image without losing alpha transparency, and without using
transparent colors of course?
----
Manual Page -- http://www.php.net/manual/en/function.imagerotate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40077
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40077&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40077&report=yes
Search -- http://master.php.net/manage/user-notes.php