2.0.0 • Published 4 years ago

quick-resize v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Quick resize

Use this package to easily resize images.

Installation

Start with installing the package: $ npm install -g quick-resize

Usage

Execute in your command line:

$ quick-resize --image=image.png --destination=resized/ [--config=resize-config.json] [--width=256] [--height=256]
Parameters
ParameterDescription
--configJSON config file
--imageThe image to resize
--destinationThe destination folder for your generated images
--widthWidth of the resized image
--heightHeight of the resized image
Configuration

By using the config parameter, the rest of the possible parameters won't be used. The image, destination, width and height parameter must be present in this JSON file. Besides these parameters, there are some more:

ParameterTypeDescription
imageStringThe image to resize
destinationStringThe destination folder for your generated images
widthNumberWidth of the resized image
heightNumberHeight of the resized image
multipleImagesBooleanIf true, images will be used instead of image. Default is false
imagesString[]Array of images to resize
multipleSizesBooleanIf true, sizes will be used instead of width and height. Default is false
sizes{ width: Number, height: Number }[]Array with multiple sizes

Example config file

{
  "image": "logo.png",
  "destination": "your/destination/folder/",
  "width": 100,
  "height": 100,
  "multipleImages": false,
  "images": [],
  "multipleSizes": false,
  "sizes": []
}
2.0.0

4 years ago

1.0.0

5 years ago