Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwagner/smartcrop-cli
Command line interface for the smartcrop library to provide content aware image cropping.
https://github.com/jwagner/smartcrop-cli
Last synced: 1 day ago
JSON representation
Command line interface for the smartcrop library to provide content aware image cropping.
- Host: GitHub
- URL: https://github.com/jwagner/smartcrop-cli
- Owner: jwagner
- License: mit
- Created: 2014-04-03T14:34:36.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-09-19T22:12:59.000Z (4 months ago)
- Last Synced: 2025-01-10T02:53:55.874Z (9 days ago)
- Language: JavaScript
- Size: 63.5 KB
- Stars: 322
- Watchers: 13
- Forks: 40
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rainmana - jwagner/smartcrop-cli - Command line interface for the smartcrop library to provide content aware image cropping. (JavaScript)
README
# Command line interface for smartcrop.js
[![Build Status](https://travis-ci.org/jwagner/smartcrop-cli.svg?branch=master)](https://travis-ci.org/jwagner/smartcrop-cli)
![Example](http://29a.ch/sandbox/2014/smartcrop/example.jpg)
Image: [https://www.flickr.com/photos/endogamia/5682480447/](https://www.flickr.com/photos/endogamia/5682480447) by N. FeansYou can learn more about smartcrop.js on the [library homepage](https://github.com/jwagner/smartcrop.js)
If the optional dependency [node-opencv](https://github.com/peterbraden/node-opencv)
is installed smartcrop-cli can additionally detect faces and take them into account
when finding the optimal crop.## Installation
You can install [smartcrop-cli](https://www.npmjs.com/package/smartcrop-cli) using [npm](https://www.npmjs.com/):
```
npm install -g smartcrop-cli
```## Dependencies
Smartcrop-cli requires [image magick](https://www.imagemagick.org/) version 6 to operate.
On Debian based systems `apt-get install imagemagick` on mac os `brew install imagemagick`.
**Imagemagick version 7 will not work.**## Usage
```
Usage: smartcrop [OPTION] FILE [OUTPUT]Examples:
smartcrop --width 100 --height 100 photo.jpg square-thumbnail.jpg generate a 100x100 thumbnail from photo.jpgOptions:
--config path to a config.json
--width width of the crop
--height height of the crop
--faceDetection perform faceDetection using opencv
--outputFormat image magick output format string [default: "jpg"]
--quality jpeg quality of the output image [default: 90]
-* forwarded as options to smartcrop.js
```