How can I test images for validity?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
grgoffe
Posts: 3
Joined: 2010-04-02T00:00:28-07:00
Authentication code: 8675308

How can I test images for validity?

Post by grgoffe »

Hi,

I have a rather large number of images but some are broken. Is there a way for me to test these and identify the ones that are broken?

Thanks,

George...
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How can I test images for validity?

Post by snibgo »

You might try to convert each one. If the return code ("errorlevel" in Windows) is non-zero, or you don't get a resulting image, the input was broken.
snibgo's IM pages: im.snibgo.com
Post Reply