1
I want to make a automator script that goes trough a folder with subfolders and convert all .JPEG (or .JPG) to the same JPEG, but with a quality of 80%.
There is no option in Automator it self like there is in Preview, Pixelmator or Photoshop when saving the JPEG to set the quality. So I installed ImageMagick via homebrew, but I don't know how to pass it functions trough automator.
TL;DR: convert only JPEG in folder with sub folders to a lower quality using automator and don't move the files.
I have this script
find . -type f -iname "*.jpg" -exec convert \{\} -quality 80 \{\} \;
and it works fine in a terminal window if Icd Path/to/MyFolder
but its not working in side automator. – juistm – 2015-06-23T17:11:01.327I have no mac to test it now... but you can run this command as a little script to overcome the problem. BTW You should have problem to
convert
a file with the same name for input and output (they didmogrify
for it). Moreover it sounds me strange the protection for\{\}
( it should be{}
) – Hastur – 2015-06-23T17:39:22.693Just a try: Try to substitute
"*.jpg"
with'*.jpg'
... or to escape the"
with-iname \"*.jpg\"
– Hastur – 2015-06-25T14:06:27.180would upvote 5 times if i could! Thank you! – AlexDrenea – 2019-08-25T13:36:23.623
@AlexDrenea You're welcome. BTW for what specifically? – Hastur – 2019-08-25T15:24:21.150
@Hastur I would have never found the mogify command on my own (such a werid name).... I'm using it to batch convert pictures taken with a camera at JPEG Super Fine setting (which is essentially JPEG 100). There is no visible difference between the 80 and 100 quality (barely visible at 100% crop) but the size if 3-4 times lower. – AlexDrenea – 2019-08-27T01:41:12.513
@AlexDrenea Since you want to use it for the_original_ photos, I strongly suggest to test some lossless format. Even the simple PNG or the TIFF (lossless) one. Once you decrease the quality you will not have the possibility to come back... and even if it is satisfactory, it may happen that in some years you may need it back.
– Hastur – 2019-08-28T17:14:27.603:-)
. PS> You may even try to compress withrar
or7z
...@Hastur thanks for the suggestion. I've built a system over the years where I do an initial selection of photos that are really good and store the original RAW image for those. For the hundreds of others, that I know i'm likely never touching again, I just convert them to JPEG 80 so they are easily stored and viewed in the future. – AlexDrenea – 2019-08-29T22:36:14.597