Ruby图形库 [英] Ruby graphic libraries

查看:105
本文介绍了Ruby图形库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RMagic,ImageMagick,GD等有什么区别,我应该使用哪一个?我正在寻找一个缩略图生成脚本,并注意到我发现的每个脚本都使用不同的库来实现相同的功能。 解决方案

Imagemagick ,GD,DevIL和GraphicsMagick是用来创建和编辑图像文件的库。 RMagick是ImageMagick / GraphicsMagick的红宝石包装。您可能会发现其他包装



我有幸安装并配置了GraphicsMagick(类似于ImageMagick),并在我的Mac上使用RMagick。



你在做批处理吗?什么是逻辑调整大小(固定X Y,max X ,减少百分比)?图像类型(PNG,JPG,GIF,BMP)?与其他工具集成(回形针,如上所述)?什么是你的服务器设置(共享主机,可以安装库等)?



如果您提供一些关于缩略图生成需求和设置的更多详细信息,一个更好的答案,但我会建议至少给与GraphicsMagick和ImageMagick一起尝试,以及mini_magick或rmagick。 Imagescience对我来说听起来也很有趣,虽然......


What's the difference between RMagic, ImageMagick, GD, etc. and which one should I use? I was looking for a thumbnail generation script and noticed that every script I found uses a different library for the same thing.

解决方案

Imagemagick, GD, DevIL, and GraphicsMagick are libraries used to create and edit image files. RMagick is a ruby wrapper around ImageMagick/GraphicsMagick. You may find other wrappers

I've had luck installing and configuring GraphicsMagick (similar to ImageMagick) and using RMagick on my Mac.

Are you doing batch processing? What about logical resizing (fixed XY, max XY, percent reduction)? Image types (png, jpg, gif, bmp)? Integration with other tools (Paperclip, as mentioned above)? What's your server setup (shared host, can install libraries, etc.)?

If you provide some more details on your thumbnail generation needs and your setup that might help give you a better answer, but I'd suggest giving at least GraphicsMagick and ImageMagick a try, along with mini_magick or rmagick. Imagescience sounds interesting to me too though...

这篇关于Ruby图形库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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