Please use @edward1993/img-editor instead, it has the same functionalities and more
NOTE: This tool uses sharp
for image manipulation. More info here
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.
npm i -g @edward1993/resize-js
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
Currently supported image formats are JPEG, PNG, WebP, GIF, SVG, TIFF