An easy and fast tool to process images.
https://github.com/joway/imagic
go get github.com/joway/imagic
Or
-o, --output string Output directory
-p, --parallel int Number of parallel tasks (default 4)
-s, --suffix string Suffix of precessed image filename, format: [base_filename][suffix].[ext]
-q, --quality int Quality of image compression (default 70)
$ imagic compress -q 70 -p 10 \
-s .comp -o ./output \
./testdata/**/*.png
-l, --height int Height of output image, default adaptive
-w, --width int Width of output image, default adaptive
$ imagic resize -w 320 -p 10 \
-s .comp -o ./output \
./testdata/**/*.jpg
-x, --X string Pos X (default "+0")
-y, --Y string Pos Y (default "+0")
-t, --texture string Texture filename
$ imagic watermark -x -600 -y -100 \
-t ./testdata/images/texture.png \
-p 10 -o ./output \
./testdata/**/*.jpg