note 96840 added to function.imagerotate

From: Date: Thu, 18 Mar 2010 16:42:07 +0000
Subject: note 96840 added to function.imagerotate
Groups: php.notes 
Request: Send a blank email to php-notes+get-167172@lists.php.net to get a copy of this message
I corected the code of kmrohe at letsco dot de. In my case his code converted white to blue. In my code it is fixed. function rotateImage($image) { $width = imagesx($image); $height = imagesy($image); $newImage = imagecreatetruecolor($height, $width); imagealphablending($newImage, false); imagesavealpha($newImage, true); for($w=0; $w<$width; $w++){ for($h=0; $h<$height; $h++) { $ref = imagecolorat($image, $w, $h); $colors = imagecolorsforindex($image, $ref); $col = imagecolorallocate($newImage, $colors['red'], $colors['green'], $colors['blue']); imagesetpixel($newImage, $h, ($width-1)-$w,$col); } } return $newImage; } ---- Server IP: 82.177.164.100 Probable Submitter: 195.94.215.34 ---- Manual Page -- http://www.php.net/manual/en/function.imagerotate.php Edit -- https://master.php.net/note/edit/96840 Del: integrated -- https://master.php.net/note/delete/96840/integrated Del: useless -- https://master.php.net/note/delete/96840/useless Del: bad code -- https://master.php.net/note/delete/96840/bad+code Del: spam -- https://master.php.net/note/delete/96840/spam Del: non-english -- https://master.php.net/note/delete/96840/non-english Del: in docs -- https://master.php.net/note/delete/96840/in+docs Del: other reasons-- https://master.php.net/note/delete/96840 Reject -- https://master.php.net/note/reject/96840 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167172) next »