How to verify/check pictures for defects?

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
bensto
Posts: 31
Joined: 2012-07-02T00:32:10-07:00
Authentication code: 13

How to verify/check pictures for defects?

Post by bensto »

Occasionally *.jpg or *.png or *.gif pictures are downloaded or saved with damages.

How can I check which of the thousands of images in the dir tree beginning with

D:\mypictures\

are currently damaged?

Ben
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to verify/check pictures for defects?

Post by fmw42 »

How badly damaged? If damaged enough that IM cannot open them, then you can try reading or displaying them and catch any error messages.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to verify/check pictures for defects?

Post by anthony »

Do you mean black areas, black lines, or something else.

In most cases image defects (as opposed to file format defects) can only be specifically tested for. There is no real 'global' test for a image defect. That is humans can tell is something is wrong. Computers need to be taught.
as I like to say wrote:Computers are dumb... Unless otherwise stated! -- Anthony Thyssen
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply