FireLizzard Posted April 21, 2010 Share Posted April 21, 2010 I'm using GD to rotate images, but it is screwing up my transparency. Here is my page. Here is the php for get.php: <?php //echo "<pre>" . print_r($_SERVER, true) . "</pre>"; function root_url_path() { try { throw new Exception(); } catch (Exception $e) { preg_match("/exception 'Exception' in ([^:]*):[0-9]*/", $e, $matches); preg_match("/([^\.]*)".str_replace("/", "\\/", $_SERVER['PHP_SELF'])."/", $matches[1], $matches); return $matches[1]; } } $dir = root_url_path(); $section = $_REQUEST['sec']; $region = $_REQUEST['reg']; $rotation = $_REQUEST['deg']; $loadfile = "$dir/layout/$section/$region.png"; header("Content-type: image/png"); $img = imagecreatefrompng($loadfile); $img = imagerotate($img, $rotation, 0, 0); imagepng($img); ?> Can anyone tell me how to rotate the images without losing transparency? Link to comment https://forums.phpfreaks.com/topic/199211-gdrotationtransparency-issues/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.