From 101b0afb0c7a4c6c2b2be63e0c60f582bd750293 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 5 Sep 2015 18:12:11 +0300 Subject: [PATCH] .zshrc: Add -strip to gmsmartresize function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .zshrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index 518c336..d308897 100644 --- a/.zshrc +++ b/.zshrc @@ -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