ImageMagick 和 libGD 有什么区别?
我对这两个图书馆一无所知,但我必须选择其中一个。 您会推荐哪一款?
我正在使用 Perl。 我需要为天气网站生成图像。 该图像是针对某个位置生成的,内部应包含温度和天气状况图像。 我想这对于两个库来说都是小菜一碟。 但我想知道哪一个更强大。 我读到 libGD 无法旋转文本。 也许还有其他一些缺点? 哪一个生成图像的速度更快? 谁的API更容易使用?
I don't know anything about either library but I have to choose one of them.
Which one whould you recommend?
I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to know which one is more powerful. I've read that libGD is not able to rotate text. Maybe there are some other drawbacks? Which one generates images faster? Whose API is easier to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据 此来源,您应该使用 GD:
您可以阅读“使用 Perl 和 GD 开发您自己的天气图和警报”,其中这就是您正在寻找的。
如果你有时间的话。 两者都尝试一下,玩一点,然后决定。
according to this source, you should use GD:
And you can read "Develop your own weather maps and alerts with Perl and GD", which is what you're looking for.
If you some some time. try them both, play a little, and decide.
我发现两者都易于使用 ImageMagick 为您提供了比 gd 更多的功能。 以下是我帖子中的两个 Magick 示例:
如何我将 IO::Scalar 与 Image::Magick::Read()
如何使用 Image::Magick 调整图像大小以适合区域?
为您提供 API 示例。
我使用 GD 创建了可视化。
请参阅该页面上的脚本:giss-timeline-graphs.pl。
I find both to be straightforward to use ImageMagick gives you a lot more power than gd. Here are two Magick examples from my posts:
How can I use IO::Scalar with Image::Magick::Read()
How can I resize an image to fit area with Image::Magick?
to give you examples of the API.
I have used GD to create a visualization.
See Script : giss-timeline-graphs.pl on that page.
imagemagick 更强大,但是 libGD 也应该能够涵盖大部分图像生成任务。 您应该查看这两个库的 perl API/函数,看看哪个对您来说更方便。
imagemagick is more robust, however libGD should be able to cover most of the image generation tasks as well. you should see perl API/functions to both of these libraries to see what is more convenient for you.