Having only a valid GD image resource is it possible to find out the type of the original image?
For instance:
$image = ImageCreateFromPNG('http://sstatic.net/so/img/logo.png');
Can I get the original image type (PNG) having only the $image variable available?
I don’t think so, no. $image is in GD’s internal image format after it has been processed by the
ImageCreate()function.