Is there a good way to see what format an image is, without having to read the entire file into memory?
Obviously this would vary from format to format (I\'m particular
Most image file formats have unique bytes at the start. The unix file command looks at the start of the file to see what type of data it contains. See the Wikipedia article on Magic numbers in files and magicdb.org.
file