An easy and fast tool to process images.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
cmd
docs
pkg
testdata/images
vendor
.gitignore
.travis.yml
CNAME
LICENSE
README.md
benchmark.sh
dep.sh
go.mod
go.sum
logo.png
logo.psd
main.go
watermark.png

README.md

Imagic

logo

GitHub release Travis Build Go Report Card codecov CircleCI

An easy and fast tool to process images.

https://github.com/joway/imagic

Install

go get github.com/joway/imagic

Usage

Supported format

  • png
  • jpeg

Global Flags

-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]

Compress

Usage

-q, --quality int     Quality of image compression (default 70)

Example

$ imagic compress -q 70 -p 10 \
	-s .comp -o ./output \
	./testdata/**/*.png

Resize

Usage

-l, --height int   Height of output image, default adaptive
-w, --width int    Width of output image, default adaptive

Example

$ imagic resize -w 320 -p 10 \
	-s .comp -o ./output \
	./testdata/**/*.jpg

Watermark

Usage

-x, --X string         Pos X (default "+0")
-y, --Y string         Pos Y (default "+0")
-t, --texture string   Texture filename

Example

$ imagic watermark -x -600 -y -100 \
	-t ./testdata/images/texture.png \
	-p 10 -o ./output \
	./testdata/**/*.jpg

X,Y Position:

watermark

Who's using Imagic?

Jallery

Benchmark

benchmark.md

Acknowledgement