Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

edward93/resize-js

Repository files navigation

WARNING! this package is deprecated!

Please use @edward1993/img-editor instead, it has the same functionalities and more

resize-js

npm (scoped) Build Status

Powerful yet simple image manipulation tool

NOTE: This tool uses sharp for image manipulation. More info here

Announcements

New v1.1.0 version is here. Check out the Release Notes.
With this new release it is possible specify 'grayscale' argument only skipping 'width'.
New output parameter is added which allows you to specify where to save your "modified" images.

Install

npm i -g @edward1993/resize-js

Usage

Usage: resize-js [options]

Options:
  --version        Show version number                                 [boolean]
  --file, -f       file or glob                              [string] [required]
  --width, -w      width of the output image in pixels                  [number]
  --grayscale, -g  Convert to grayscale               [boolean] [default: false]
  --output, -o     Output folder                         [string] [default: "."]
  -h, --help       Show help                                           [boolean]

Examples:
  resize-js -f ./img.png -w 25 -g
  resize-js -f ./img.png -g -o ./test # will create ./test folder if it doesn't exist

Copyright 2020

Limitations

Currently supported image formats are JPEG, PNG, WebP, GIF, SVG, TIFF