Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.18 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.18 KB

Command line interface for smartcrop.js

Example Image: https://www.flickr.com/photos/endogamia/5682480447/ by N. Feans

You can learn more about smartcrop.js on the library homepage

Installation

You can install smartcrop-cli using npm

npm install -g smartcrop-cli

Dependencies

Smartcrop-cli requires node-canvas which requires local libraries to be installed. Please refer to the node-canvas wiki for platform specific installation instructions.

Usage

Usage: node ./smartcrop-cli.js [OPTION] FILE [OUTPUT]

Examples:
  node ./smartcrop-cli.js --width 100 --height 100 photo.jpg square-thumbnail.jpg    generate a 100x100 thumbnail from photo.jpg


Options:
  --config   path to a config.json               
  --width    width of the crop                   
  --height   height of the crop                  
  --quality  jpeg quality of the output image      [default: 90]
  -*         forwarded as options to smartcrop.js