Path: blob/master/node_modules/@jimp/plugin-resize/README.md
1126 views

@jimp/plugin-resize
Resize an image.
Resizes the image to a set width and height using a 2-pass bilinear algorithm/
Usage
@param {number} w the width to resize the image to (or Jimp.AUTO)
@param {number} h the height to resize the image to (or Jimp.AUTO)
@param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)
@param {function(Error, Jimp)} cb (optional) a callback for when complete
Auto
Jimp.AUTO
can be passes to either the height or width and jimp will scale the image accordingly. Jimp.AUTO
cannot be both height and width.
Resize modes
The default resizing algorithm uses a bilinear method.
Optionally, the following constants can be passed to choose a particular resizing algorithm: