note 100521 added to function.imagerotate
| From: | mikeatxantivadotde at osu1 dot php dot net | Date: | Thu, 21 Oct 2010 09:11:00 +0000 |
| Subject: | note 100521 added to function.imagerotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173333@lists.php.net to get a copy of this message | ||
Hi,
I found the snippet from beau at dragonflydevelopment dot com useful, but sligthly buggy. There is a
small pixel error ...
I have to subtract "1" from the with in the case 180 and 270:
<?php
switch ($rotation) {
case 90:
imagesetpixel($destImage, ($height - 1) - $j, $i, $reference);
break;
case 180:
imagesetpixel($destImage, $width - 1 - $i, ($height - 1) - $j, $reference);
break;
case 270:
imagesetpixel($destImage, $j, $width - 1 - $i, $reference);
break;
}
?>
----
Server IP: 217.160.235.204
Probable Submitter: 92.72.25.176
----
Manual Page -- http://www.php.net/manual/en/function.imagerotate.php
Edit -- https://master.php.net/note/edit/100521
Del: integrated -- https://master.php.net/note/delete/100521/integrated
Del: useless -- https://master.php.net/note/delete/100521/useless
Del: bad code -- https://master.php.net/note/delete/100521/bad+code
Del: spam -- https://master.php.net/note/delete/100521/spam
Del: non-english -- https://master.php.net/note/delete/100521/non-english
Del: in docs -- https://master.php.net/note/delete/100521/in+docs
Del: other reasons-- https://master.php.net/note/delete/100521
Reject -- https://master.php.net/note/reject/100521
Search -- https://master.php.net/manage/user-notes.php