I'm trying to output an image with PHP
, but when I do it, it won't look as the original image. The original image has transparent background, and the outputted image has some weird background which "kills" the image.
This is my code:
<?php
$image = imagecreatefrompng('./logo2.png');
$imagesize = getimagesize('./logo2.png');
header('Content-type: ' . $imagesize['mime']);
imagepng($image);
imagedestroy($image);
If you need anything else in order to determine the issue, please tell me.