quote:
Originally posted by Mattike
When you open a PNG file in Notepad, you'll see it begins with:
code:
‰PNG
By looking for that, a developer can determine if the .dat is a PNG.
GIF's always start with:
code:
GIF
so that's another way to check the type of the image.
In fact that should be the
only way to determine what format the file is (aka reading the internal header and format).
File extension names don't say a thing...
----------
File extension names are like logo's on cars. A car can have the logo of a Porsche, but that doesn't automatically mean it is a Porsche. You could assume it is a Porsche, but to make sure you need to look under the hood...
=> It isn't because a file is named as PNG that it actually is a PNG.
Vice versa, when driving a car with the Porsche logo you suddennly notice that you can also literally take off and fly with it, it doesn't mean that "Porsche"'s are also airplanes... (as it was a stupid mechanic who put the Porsche logo on a SpitFire)
=> It isn't because a PNG seems to be animated when viewed with WinFaxViewer that PNGs can be animated (as it is actually an animated GIF with the wrong extension ".PNG").