Determining if file is valid image file
larry.bates at websafe.com
Thu Aug 2 16:34:16 CEST 2007
> On Aug 2, 11:14 am, André <andre.robe... at gmail.com> wrote:
>> Other than installing PIL, is there a "simple" way using Python only
>> to determine if a file is a valid image file?
>> I'd be happy if I could at least identify valid images files for gif,
>> jpeg and png. Pointers to existing modules or examples would be
>> The reason why I'd prefer not using PIL is that I'd like to bundle
>> such a function/module in my app.
> I should have added: I'm interesting in validating the file *content*
> - not the filename :-)
And what's wrong with bundling PIL in your application?
More information about the Python-list