📜  jimp 获取图像大小 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:21.493000             🧑  作者: Mango

代码示例1
//Using Jimp - downloadable and docs -> https://www.npmjs.com/package/jimp

const Jimp = require('jimp');
var image = new Jimp("./path/to/image.jpg/png", function (err, image) {
    var w = image.bitmap.width; //  width of the image
    var h = image.bitmap.height; // height of the image
})