PHP and GD seem to have trouble creating images from PNGs of type greyscale with alpha when using imagecreatefrompng()
. The results are incredibly distorted. >
see this answer :
Another usefull note for those using ImageCreateFromPng: PHP and GD do not recognize grayscale/alpha images.
So if you use grayscale images with transparency between 0% and 100%, then save the image as RGB.
At least this is true for PHP Version 4.4.2-1 and in 5.1.2-1 with pictures made with GIMP 2.2.8.
url : http://php.net/manual/en/function.imagecreatefrompng.php