note 62530 added to function.imagerotate
| From: | garethatcrxchaosdotcodotuk at osu1 dot php dot net | Date: | Thu, 02 Mar 2006 15:19:31 +0000 |
| Subject: | note 62530 added to function.imagerotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104712@lists.php.net to get a copy of this message | ||
It's worth noting this function will only rotate true colour images - If you have a 256 colour
pallet based image it will not rotate with this. Use the following code to convert the 256 colour
image to truecolour first:
<?php
if (!imageistruecolor($im))
{
$w = imagesx($im);
$h = imagesy($im);
$t_im = imagecreatetruecolor($w,$h);
imagecopy($t_im,$im,0,0,0,0,$w,$h);
$im = $t_im;
}
?>
I have found no mention of this shortcoming of imagerotate anywhere on the Internet. Hopefully this
will limit the number of people who, like me, are trying to troubleshoot a perfectly operation PHP
install.
----
Server IP: 216.194.113.175
Probable Submitter: 81.174.236.171
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.imagerotate.php
Edit -- http://master.php.net/note/edit/62530
Del: integrated -- http://master.php.net/note/delete/62530/integrated
Del: useless -- http://master.php.net/note/delete/62530/useless
Del: bad code -- http://master.php.net/note/delete/62530/bad+code
Del: spam -- http://master.php.net/note/delete/62530/spam
Del: non-english -- http://master.php.net/note/delete/62530/non-english
Del: in docs -- http://master.php.net/note/delete/62530/in+docs
Del: other reasons-- http://master.php.net/note/delete/62530
Reject -- http://master.php.net/note/reject/62530
Search -- http://master.php.net/manage/user-notes.php