image-batch-resizer

CLI batch image resizer

npm install image-batch-resizer
19 downloads in the last week
39 downloads in the last month

image-batch-resizer

CLI script for asynchronous batch image resizing.

Description:

This script asynchronously resizes image files, recursively searching for images in selected directory.

It relies on ImageMagick's convert functionality.

Install:

npm install image-batch-resizer -g

Before using image-batch-resizer you MUST install the ImageMagick suite and have the convert binary present!

For Mac OS X with installed brew

brew install imagemagick

For any other distrubution: Install ImageMagick according to your system's package management guidelines.

Usage:

$ image-batch-resizer -d ./image_dir

Calling without any arguments will show usage information

$ image-batch-resizer 

Image batch resizer v.0.7.7

This script asynchronously resizes image files, recursively searching for images in selected directory.
Usage: image-batch-resizer -d [start directory]

Options:
  -d, --dir, --directory      Directory to start recursive search                 [required]
  -p, --prefix                Prefix for resized images                           [default: "res_"]
  -R, --remove-original-file  Remove original file after conversion ("yes"|"no")  [default: "no"]
  -s, --size                  New image size (add ">" to prevent upscale)         [default: "1920x1080>"]
  -w, --workers               Number of workers (parallel jobs)                   [default: "auto"]

Size property:

Any valid ImageMagick geometry argument form may be used at "size" property (see ImageMagick Image Geometry).

In default settings used ">" postfix:

widthxheight> Shrinks images with dimension(s) larger than the corresponding width and/or height dimension(s).

If you would change --size - don`t forget about right postfix!

Thanks:

Thanks to portsnap for grammatical errors fix.

Thanks to soldair for node-walkdir - it really works on large directories.

Develop:

Classes docs available at /docs folder

npm loves you