Determining if file is valid image file

brad byte8bits at gmail.com
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.

Brad



More information about the Python-list mailing list