tags:

views:

291

answers:

3

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?

+2  A: 

according to this source, you should use GD:

GD and other modules built on top of that (like GD::Graph) are more aimed at producing "new" images like charts.

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.

Adam Matan
A: 

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.

dusoft
A: 

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:

to give you examples of the API.

I have used GD to create a visualization. See Script : giss-timeline-graphs.pl on that page.

Sinan Ünür