Package Exports
- @jimp/plugin-resize
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jimp/plugin-resize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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
import jimp from 'jimp';
async function main() {
const image = await jimp.read('test/image.png');
image.resize(150, jimp.AUTO);
}
main();