note 100521 deleted from function.imagerotate by danbrown

From: Date: Thu, 21 Oct 2010 13:22:31 +0000
Subject: note 100521 deleted from function.imagerotate by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173341@lists.php.net to get a copy of this message
Note Submitter: mike at xantiva dot de ---- 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; } ?>

« previous php.notes (#173341) next »