|
před 3 týdny | |
---|---|---|
.. | ||
es | před 3 týdny | |
src | před 3 týdny | |
CHANGELOG.md | před 3 týdny | |
LICENSE | před 3 týdny | |
README.md | před 3 týdny | |
index.d.ts | před 3 týdny | |
package.json | před 3 týdny |
Uniformly scales the image by a factor.
@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.scale(2);
image.scale(2, jimp.RESIZE_BEZIER);
}
main();
Scale the image to the largest size that fits inside the rectangle that has the given width and height.
@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.scaleToFit(100, 100);
}
main();