note 87363 added to function.imagerotate
| From: | joseluisatpellicerdotorg at osu1 dot php dot net | Date: | Tue, 02 Dec 2008 04:14:49 +0000 |
| Subject: | note 87363 added to function.imagerotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-147507@lists.php.net to get a copy of this message | ||
About that rotating function by david at horizon-nigh not working, I found the bug.
I noticed that the x1 and y1 where not used, so, in the loop through every pixel and transform it,
change
$x2 = $x * cos($theta) - $y * sin($theta);
$y2 = $x * sin($theta) + $y * cos($theta);
to:
$x2 = $x1 * cos($theta) - $y1 * sin($theta);
$y2 = $x1 * sin($theta) + $y1 * cos($theta);
----
Server IP: 69.147.83.197
Probable Submitter: 189.216.249.150
----
Manual Page -- http://www.php.net/manual/en/function.imagerotate.php
Edit -- https://master.php.net/note/edit/87363
Del: integrated -- https://master.php.net/note/delete/87363/integrated
Del: useless -- https://master.php.net/note/delete/87363/useless
Del: bad code -- https://master.php.net/note/delete/87363/bad+code
Del: spam -- https://master.php.net/note/delete/87363/spam
Del: non-english -- https://master.php.net/note/delete/87363/non-english
Del: in docs -- https://master.php.net/note/delete/87363/in+docs
Del: other reasons-- https://master.php.net/note/delete/87363
Reject -- https://master.php.net/note/reject/87363
Search -- https://master.php.net/manage/user-notes.php