在 ImageMagick 中通过 Node.JS 使用远程图像
如何在 Node.JS 中使用 ImageMagick 中的远程图像?
我想实现类似的目标:
im.identify('http://www.website.com/image.jpg', function(error, features) {
console.log(features);
});
How can I use remote image in ImageMagick with Node.JS?
I want to achieve something like:
im.identify('http://www.website.com/image.jpg', function(error, features) {
console.log(features);
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(4)
图像大小调整的快速代码片段
http://nodejs.org/api/http .html
https://github.com/rsms/node-imagemagick
A quick code snippet of image resizing
http://nodejs.org/api/http.html
https://github.com/rsms/node-imagemagick
这就是我使用远程图像的方式:
请访问 https://stuk.github。 io/jszip/documentation/howto/read_zip.html
This is how I use remote images:
Credit go to https://stuk.github.io/jszip/documentation/howto/read_zip.html
很难说我是否正确理解了你(考虑到你在这里发布的信息量)。
使用 imagemagick 对远程图像执行操作的唯一方法是先将其下载到本地服务器。这可以使用 http.ClientRequest 类来完成node.js,之后您应该能够像往常一样使用 Imagemagick 对图像进行操作。
It's hard to say if i understood you correctly (considering the amount of information you posted here).
The only way you can perform operations on a remote image using imagemagick is to download it to the local server first. This can be done using the http.ClientRequest class of node.js, afterwards you should be able to operate on the image as usual using Imagemagick.
这应该有效:
This should work: