In the images folder i have a notfound.php file with
<?php
header('Content-type: image/png');
$im = imagecreatefrompng('simnotfound.png');
imagepng($im);
imagedestroy($im);
?>
The image is a 256 by 256. The notfound.php page shows a black 256 by 256 square. The image is not all black tho. Its just some black text on a transparent background in the center.
The fix is
<?php
header('Content-type: image/png');
$im = imagecreatefrompng('simnotfound.png');
imagealphablending($im, true); // setting alpha blending on
imagesavealpha($im, true); // save alphablending setting (important)
imagepng($im);
imagedestroy($im);
?>
create your image file one more time with white background to check that is read correctly, if yes – problem is your transparent background
also try with other file to eliminate problem with reading this specific file