Home

"Jarek Zgoda" <jzgoda@usun.pl> wrote in message
news:f8tbd6$rnh$1@nemesis.news.tpi.pl...
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
> pass the imghdr.what() test.

To put it another way, the only way to determine whether a coded file is
valid may be to decode it. And even then, it may be corrupted in the sense
that the decoded version may have artifacts not in the original. I have
seen the latter both in jpeg images and movie DVDs.

tjr

previous
next

Re: correction
interesting makefile issue
Re: Python code-writing for the blind. Was (Re: newbie: stani's python editor if-else)
Re: The least used keywords in C++, which do you use?
Re: help please - newbie learning c++
Veľkoobchod bižutéria
gry video
buty do tańca
kable komputerowe
portal-ekologia.com.pl