July 13th, 2006

Using ImageMagick and 4NT to find jpegs by quality level

Using ImageMagick and 4NT to find and modify all jpegs in the current dir who have quality level 94:

for %f in (*.jpg) do (echo %f
& identify -verbose %f | grep Quality
| grep -o “[0-9]*”)

iff “%@execstr[identify -verbose %f
| grep Quality | grep -o “[0-9][0-9]”]” == “94″
then & echo %f & endiff

for %f in (*.jpg) do
(iff “%@execstr[identify -verbose %f
| grep Quality | grep -o “[0-9][0-9]”]” == “94″
then & echo %f &
mogrify -strip -quality 84 %f & endiff)


Unrelated side note:
This is one of several posts that I will be making in the near future, which come directly from my ever-growing toblog.txt file… No code cleanup or lengthly explanations, just commands I’ve run at some point that I thought were worth saving.

One Response to “Using ImageMagick and 4NT to find jpegs by quality level”

  1. ClintJCL Says:

    To me, it looks like this example has several unclosed left brackets. (”[identify” with no closing “]”)

    This is TOTALLY UP MY ALLEY, as I have 4NT and Image::Magick for perl. And I use 4nt+ImageMagick a lot.

    (My flickr uploader is now enhanced to generate captions based on the tags… and my image-index (local view-all-images-as-an-HTML-file-in-your-recycle-bin) script now shows my tags to the right of the image (Cause I tag everything using my own system, before it gets converted for flickr).

    Result is that I can do a pic+tag review, visually, before uploading to flickr, to catch problems ahead of time.

    ImageMagick freakin’ rules.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>