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.


August 15th, 2006 at 1:25 pm
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.