Skip to content
This repository was archived by the owner on Jun 10, 2021. It is now read-only.
/ imgr-rszr Public archive

Resize a bunch of images through command line

License

Notifications You must be signed in to change notification settings

dcefram/imgr-rszr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imgr-rszr

Image resizer command line tool. I shall use this for my blog images before uploading it to my server.

Usage

# install dep
go get -u github.com/golang/dep/cmd/dep

# go get img-rszr :D
go get github.com/dcefram/imgr-rszr

# cd to imgr-rszr
dep ensure
go install

# If you have your /go/bin included in your path, you can do this:
img-rszr -i "path/to/images" -o "path/to/output/folder" -height 720

# If not...
$GOPATH/bin/img-rszr -i "path/to/image" -o "path/to/output" -width 1

-i can take a path to a folder filled with png and jpegs, or the exact path of a single image file.

omitting -i would default to the current directory.

Flags

Flag Description Default Value
-i Path to the folder filled with images, or Path to the target image (JPEG and PNG files are only supported as of now) ./
-o Path to the output folder ./output
-height Define the height we should resize the image(s) to. 720
-width Define the width we should resize the image(s) to. Keep aspect ratio

* If width is only specified, it would resize the image based on the specified width while maintain aspect ratio. Same goes if only height is specified. If none of the two is specified, then it would default to 720px height whilst keeping aspect ratio.

About

Resize a bunch of images through command line

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages