note 40077 rejected from function.imagerotate by nlopess

From: Date: Fri, 20 Feb 2004 22:09:59 +0000
Subject: note 40077 rejected from function.imagerotate by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65466@lists.php.net to get a copy of this message
Note Submitter: delobelle@blueyonder.co.uk ---- Feature? Rotated images seem to forget the alpha channel of the original image. What's the logic in that? For instance if img.png is a square image which is transparent then <?php $img = imagecreatefrompng("img.png"); $anycolor = // whatever color you like $rot = imagerotate($img, 90, $anycolor); imagesavealpha($rot, true); imagepng($rot); ?> outputs a black square. So is there a way to rotate an image without losing alpha transparency, and without using transparent colors of course?

« previous php.notes (#65466) next »