change jpg quality only if lower than existing
Posted: 2011-02-23T13:03:23-07:00
Hi,
Is there a way to tell mogrify to change the "-quality" compression level only if the image does not already have a lower quality setting?
i.e.
> mogrify -quality 50% *.jpg
should leave files that are already compressed at quality 20% untouched.
Or in other words, if the file size would increase, do not change the file.
Is there a way to tell mogrify to change the "-quality" compression level only if the image does not already have a lower quality setting?
i.e.
> mogrify -quality 50% *.jpg
should leave files that are already compressed at quality 20% untouched.
Or in other words, if the file size would increase, do not change the file.