node.js有哪些包可以进行图像裁剪? [英] What packages are available for node.js to do image cropping?

查看:225
本文介绍了node.js有哪些包可以进行图像裁剪?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用node.js创建一个网站。我看到很多图书馆都提到了像imagemagick等等。这里有一个列表: https://github.com/ry/node/wiki/modules#graphics

I'm creating a website using node.js. I have seen many libraries mentioned that piggy back on top of imagemagick etc. There is a list here: https://github.com/ry/node/wiki/modules#graphics

我要做的是拍摄用户的图像上传,将其裁剪/调整为网站所需的特定尺寸。执行此操作的最佳/最活跃脚本是什么?我想要一个支持npm的人。有没有人有使用其中一些的实际经验?

What I'm trying to do is take the image that a user uploads, crop it/size it to certain dimensions the site requires. What is the best/most active script to do this? I'd like one with npm support. Does anyone have actual experience using some of these?

推荐答案

想想我找到了一个可以很好地处理这个问题的图像恶魔包装器。在将文件写入磁盘之前,甚至在内存中。 (又名用户上传 - >节点imagemagick lib - > cdn,永远不会触摸磁盘......这就是我想要的)

Think I found a decent imagemagick wrapper that can handle this pretty well. Even in memory before writing the file to disk. (aka user upload -> node imagemagick lib -> cdn and never touching the disk ... which is what I want)

https://github.com/rsms/node-imagemagick

这篇关于node.js有哪些包可以进行图像裁剪?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆