Resize image with ease. Supports GIF, JPEG and PNG.
Go toolchain required.
go get -u github.com/maku693/imgres
Usage of imgres:
-fit string
fitting of scaled image ("contain" or "cover") (default "contain")
-height int
max height of output file
-in string
input file (optional, default stdin)
-out string
output file (optional, default stdout)
-width int
max width of output file
Before | After |
---|---|
imgres -in image.png -width 150 -out image150.png
Before | After |
---|---|
imgres -in image.png -width 150 -height 200 -fit cover -out image150x200cover.png
Before | After |
---|---|
imgres -width 100 < image.png > image100.png