I'm trying to draw on my image which has a transparent background around a circle in the middle of it, the issue is my transparent part of this image turns black when i run it.
what is wrong?
header("Content-Type: image/png");
$image = ImageCreateFrompng("image.png");
$x1 = 40;
$y1 = 50;
$x2 = 20;
$y2 = 240;
$blue = imagecolorallocate($image, 0, 0, 255);
imageline($image, $x1, $y1, $x2, $y2, $blue);
imagepng ($image, NULL, 9);
imagedestroy($image);
?>