Re: Determining if file is valid image file

2007-08-02 Thread Jarek Zgoda
Terry Reedy napisał(a): > Other than installing PIL, is there a "simple" way using Python only > to determine if a file is a valid image file? > [...] >> Be aware that broken images (i.e. partially downloaded) in many cases >> pass the imghdr.what() test. > > To put it another way, the on

Re: Determining if file is valid image file

2007-08-02 Thread Terry Reedy
"Jarek Zgoda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] André napisa³(a): Other than installing PIL, is there a "simple" way using Python only to determine if a file is a valid image file? [...] > Be aware that broken images (i.e. partially downloaded) in many cases >

Re: Determining if file is valid image file

2007-08-02 Thread André
On Aug 2, 4:25 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > André napisa³(a): > > 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 a

Re: Determining if file is valid image file

2007-08-02 Thread Jarek Zgoda
André napisał(a): 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 appr

Re: Determining if file is valid image file

2007-08-02 Thread brad
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 -- http://mail.pytho

Re: Determining if file is valid image file

2007-08-02 Thread Dave Hughes
André 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 > appreciated. > > The

Re: Determining if file is valid image file

2007-08-02 Thread André
On Aug 2, 11:38 am, [EMAIL PROTECTED] wrote: > On Aug 2, 9:35 am, Thomas Jollans <[EMAIL PROTECTED]> wrote: > > > > > On Thursday 02 August 2007, André wrote: > > > > On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> wrote: > > > > Other than installing PIL, is there a "simple" way using Python only >

Re: Determining if file is valid image file

2007-08-02 Thread André
On Aug 2, 11:34 am, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > André napisa³(a): > > >> 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 pn

Re: Determining if file is valid image file

2007-08-02 Thread kyosohma
On Aug 2, 9:35 am, Thomas Jollans <[EMAIL PROTECTED]> wrote: > On Thursday 02 August 2007, André wrote: > > > On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> wrote: > > > Other than installing PIL, is there a "simple" way using Python only > > > to determine if a file is a valid image file? > > > > I

Re: Determining if file is valid image file

2007-08-02 Thread Jarek Zgoda
André napisał(a): >> 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 >> appreciated

Re: Determining if file is valid image file

2007-08-02 Thread Larry Bates
André wrote: > On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> 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 exi

Re: Determining if file is valid image file

2007-08-02 Thread Thomas Jollans
On Thursday 02 August 2007, André wrote: > On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> 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, >

Determining if file is valid image file

2007-08-02 Thread André
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 appreciated. The reason why I'd prefer not usi

Re: Determining if file is valid image file

2007-08-02 Thread André
On Aug 2, 11:14 am, André <[EMAIL PROTECTED]> 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 exa