.zshrc: Add GraphicsMagick version of smartresize
GraphicsMagick is faster, often produces better results, has more sane command line options, etc... Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
parent
730319bcd1
commit
b4a54dd0e4
8
.zshrc
8
.zshrc
@ -111,5 +111,13 @@ smartresize() {
|
||||
mogrify -path $3 -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 0.25x0.08+8.3+0.045 -dither None -posterize 136 -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 -colorspace sRGB $1
|
||||
}
|
||||
|
||||
# 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 -colorspace RGB -output-directory $3 $1
|
||||
}
|
||||
|
||||
export PATH
|
||||
export MANPATH
|
||||
|
Loading…
Reference in New Issue
Block a user