Grz*_*icz 5 javascript image image-resizing
我想调整通过输入文件获得的图像的大小。我发现jimp 似乎是一个不错的选择。我的问题是我不知道如何在文件上使用它。我尝试使用这种方法:
Jimp.read(lenna.buffer)
.then(image => {
// do stuff with the image
})
.catch(err => {
// handle an exception
});
Run Code Online (Sandbox Code Playgroud)
lenna我的文件在哪里,但出现错误:
No matching constructor overloading was found.
Please see the docs for how to call the Jimp constructor.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
918 次 |
| 最近记录: |