tobeyt23 Posted August 19, 2010 Share Posted August 19, 2010 I have the following code, works rotates the image. But it seems to lose its transparency and add color when rotated to say 45. How can I avoid this? // File and rotation $filename = 'placeholder.png'; $degrees = 45; // Content type header('Content-type: image/png'); // Load $source = imagecreatefrompng($filename); // Rotate $rotate = imagerotate($source, $degrees, 0); // Output imagepng($rotate); ?> Quote Link to comment Share on other sites More sharing options...
tobeyt23 Posted August 19, 2010 Author Share Posted August 19, 2010 To explain if rotate id 90 or 180 it works perfectly, however if i do say 45 then it rotates but adds a black box around where it should be transparent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.