https://github.com/webcaetano/img-resize-cli
Image resize cli using jimp
https://github.com/webcaetano/img-resize-cli
cli image image-cli image-processing jimp node resize
Last synced: about 1 month ago
JSON representation
Image resize cli using jimp
- Host: GitHub
- URL: https://github.com/webcaetano/img-resize-cli
- Owner: webcaetano
- License: mit
- Created: 2017-04-28T12:51:06.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-20T13:00:55.000Z (about 9 years ago)
- Last Synced: 2025-10-01T09:51:36.444Z (8 months ago)
- Topics: cli, image, image-cli, image-processing, jimp, node, resize
- Language: JavaScript
- Size: 125 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# img-resize-cli
[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
> Image resize cli using jimp
## Installation
```
npm install img-resize-cli --save
```
## CLI
```
npm install img-resize-cli -g
```
```
Usage
$ rsize
Options
--porcent image porcentage resize
--width new image width, (numbers or auto)
--height new image height, (numbers or auto)
--algo resize algorithm, default: bilinear
algorithms: bilinear | neighbor | bicubic | hermite | bezier
Examples
rsize "**/*.png" "destFolder/" --porcent 50
rsize "**/*.png" "destFolder/" --width 100
rsize "**/*.png" "destFolder/" --width 100 --height 100
rsize "**/*.png" "destFolder/" --width 100 --height auto
rsize "**/*.png" "destFolder/" --porcent 25 --algo bicubic
```
## Options
Option
Description
Default
porcent
Image porcentage resize
75
width
new image width, (numbers or auto)
null
height
new image height, (numbers or auto)
null
algo
resize algorithm
algorithms: bilinear | neighbor | bicubic | hermite | bezier
bilinear
## Node Usage
```
rsize(src,dest,options)
```
## Example
```javascript
var rsize = require('img-resize-cli');
// width porcent
rsize(src,dest,{
porcent:'50%'
},function(err,data){
});
// width dimensions
rsize(src,dest,{
width:100,
height:100,
},function(err,data){
});
// full options
rsize(src,dest,{
width:'50%',
height:'auto',
alog:'bicubic',
},function(err,data){
});
```
## License
MIT
[npm-image]: https://img.shields.io/npm/v/img-resize-cli.svg?style=flat-square
[npm-url]: https://npmjs.org/package/img-resize-cli
[travis-image]: https://img.shields.io/travis/webcaetano/img-resize-cli.svg?style=flat-square
[travis-url]: https://travis-ci.org/webcaetano/img-resize-cli