note 53312 rejected from function.imagerotate by techtonik

From: Date: Thu, 01 Sep 2005 18:35:24 +0000
Subject: note 53312 rejected from function.imagerotate by techtonik
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94617@lists.php.net to get a copy of this message
Note Submitter: edeuxk at amaglueglu dot net ---- I got a little bugfix for jonathan AT sharpmedia DOT net's rotateImage function you need to replace: // Now copy tmp2 to $out; imagecopy($out, $tmp2, 0, 0, ($angle == 270 ? abs($w - $h) : 0), 0, $h, $w); with: // Now copy tmp2 to $out; if ($h>$w) { imagecopy($out, $tmp2, 0, 0, 0, 0, $h, $w); } else { imagecopy($out, $tmp2, 0, 0, ($angle == 270 ? abs($w - $h) : 0), 0, $h, $w); } otherwise the image gets moved when rotating a standing up image

« previous php.notes (#94617) next »