So I have png image and I rotate it but i get a black background.. or if i do the color code ofr white i get white.. I tried doing this..
$trans = imagecol
// Turn off transparency blending (temporarily)
imagealphablending($image, false);
// Create a new transparent color for image
$color = imagecolorallocatealpha($image, 0, 0, 0, 127);
// Completely fill the background of the new image with allocated color.
imagefill($image, 0, 0, $color);
// Restore transparency blending
imagesavealpha($image, true);