note 78751 deleted from function.imagerotate by danbrown

From: Date: Tue, 02 Dec 2008 14:58:22 +0000
Subject: note 78751 deleted from function.imagerotate by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147531@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- the solution barbarism at oscillatewildly dot com came up with to use -1 to preserve transparency apparently only works if you have PHP5 settings on your host. (This took me 2 days to figure out. I hope I save someone else that time.) My settings: PHP Version: 5.2.2 GD Version: bundled (2.0.34 compatible) Working in PHP5 Example: <?php $filename = 'picturewithtransparency.png'; $degrees = -90; // tilt it header('Content-type: image/png'); $source = imagecreatefrompng($filename); $rotate = imagerotate($source, $degrees, -1); imagealphablending($rotate, true); imagesavealpha($rotate, true); imagepng($rotate); ?>

« previous php.notes (#147531) next »