truncated jpegs etc to tag or delete or at least skip them

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
tobycarr

truncated jpegs etc to tag or delete or at least skip them

Post by tobycarr »

Hi,
is there any way using IM to seek out images that are corrupted, or truncated jpegs etc and tag or delete or at least skip them in batch processing as I have quite a few hidden in large directories,
Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: truncated jpegs etc to tag or delete or at least skip them

Post by fmw42 »

might be able to use identify if it gives you an error message.

what do you get returned with a corrupted image when you use

identify corruptedimage

or

identify -verbose corruptedimage

If you get some error message, you can write a shell script to test using identify and skip or delete the image.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: truncated jpegs etc to tag or delete or at least skip them

Post by anthony »

Also look at the option -regard-warnings
See Im Examples Operational Controls
http://www.imagemagick.org/Usage/basics/#controls
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
tobycarr

Re: truncated jpegs etc to tag or delete or at least skip them

Post by tobycarr »

Great thanks Anthony and Fred(?)

..I'll test thru those suggestions first and see how it goes..
ta
Post Reply