Rotate a PNG then resave with Image Transparency
问题 I'm having some major issues getting PNG transparency on a PNG that is being rotated. $filename = 'bird_up.png'; $source = imagecreatefrompng($filename) or die('Error opening file '.$filename); imagealphablending($source, false); imagesavealpha($source, true); $rotation = imagerotate($source, $degrees, imageColorAllocateAlpha($source, 0, 0, 0, 127)); imagealphablending($source, false); imagesavealpha($source, true); header('Content-type: image/png'); imagepng($rotation); imagedestroy($source)