Går du ind i det første kammer, da ser du midt på gulvet en stor kiste, oven på den sidder en hund; han har et par øjne så store som et par tekopper, men det skal du ikke bryde dig om! Jeg giver dig mit blåternede forklæde, det kan du brede ud på gulvet; gå så rask hen og tag hunden, sæt ham på mit forklæde, luk kisten op og tag lige så mange skillinger, du vil.
I haven’t seen that stamp before, but I immediately recognized the scene!
And I’m glad the script helps Saving 10GB is a lot.
A couple of comments. The documentation says:
cwebp [options] input_file -o output_file.webp
I put the variable cwebpArgs
at the beginning to make it easy to adjust the conversion settings. Just change that.
(Maybe I wasn’t explicit enough and calling it cwebpOptions
or adding a comment would be clearer).
set cwebpArgs to " -q 90 -m 6 -metadata icc "
Instead of adding it like this:
do shell script (cwebpPath & cwebpArgs & quoted form of thePath & " -metadata icc -o " & quoted form of newImgPath)
Also, -q 90
might be a bit high depending on what you want (the default is 75), though adding -m 6
helps a bit. It was just a placeholder configuration.
You could try the different presets. -near_lossless
can also be worth trying for tricky images. There’s also a -resize
option.