I was going to rotate an image with transparent color using php gd. However, after the rotation, the transparent color in the image is not transparent any more, and the background is not transparent either. Here is my code.
$im = imagecreatefromgif('/images/80-2.gif');
$rotate = imagerotate($im,30,imagecolorallocatealpha($im, 0, 0, 0, 127));
imagegif($rotate,'/images/rotate.gif');
imagedestroy($im);
imagedestroy($rotate);
Could anybody help me to make it work? Thanks.