.zshrc: Add -strip to gmsmartresize function

Stripping metadata from the image saves 20–50KB, and the only reas-
on I kept it in the first place was for the color profile (which is
unnecessary on the web anyways).

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-09-05 18:12:11 +03:00
parent db19761f45
commit 101b0afb0c
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

4
.zshrc
View File

@ -113,10 +113,8 @@ smartresize() {
# ported to graphicsmagick
# faster, more sane command line options, tags sRGB by default, etc
# image slightly larger but includes quite a bit of useful(?) metadata
# stripping with `jpegtran -copy none` strips 50KB+ off
gmsmartresize() {
gm mogrify -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -output-directory $3 $1
gm mogrify -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -strip -output-directory $3 $1
}
export PATH