GithubHelp home page GithubHelp logo

dcefram / imgr-rszr Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 7 KB

Resize a bunch of images through command line

License: MIT License

Go 100.00%
image-resizer image-resize command-line-tool golang

imgr-rszr's Introduction

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.

imgr-rszr's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.