note 64531 modified in function.imagerotate by danbrown

From: Date: Tue, 02 Dec 2008 14:59:43 +0000
Subject: note 64531 modified in function.imagerotate by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147535@lists.php.net to get a copy of this message
If you pass "-1" into the last param of imagecreatefrompng, it preserves PNG transparently properly! Exampe: <?php $filename = './documents/135.pdf.png'; $degrees = 40; header('Content-type: image/png'); $source = imagecreatefrompng($filename); $rotate = imagerotate($source, $degrees, -1); imagealphablending($rotate, true); imagesavealpha($rotate, true); imagepng($rotate); ?> --was-- If you pass "-1" into the last param of imagecreatefrompng, it preserves PNG transparently properly! Exampe: $filename = './documents/135.pdf.png'; $degrees = 40; header('Content-type: image/png'); $source = imagecreatefrompng($filename); $rotate = imagerotate($source, $degrees, -1); imagealphablending($rotate, true); imagesavealpha($rotate, true); imagepng($rotate); http://php.net/manual/en/function.imagerotate.php

« previous php.notes (#147535) next »