Determining if file is valid image file

brad byte8bits at
Thu Aug 2 20:59:19 CEST 2007

André wrote:

> I should have added: I'm interesting in validating the file *content*
> - not the filename :-)

Some formats have identifying headers... I think jpeg is an example of 
this. Open it with a hex editor or just read the first few bytes and see 
for yourself.


More information about the Python-list mailing list