PIL vs RMagick / ruby-gd

For my next project, I plan to create images with text and graphics. I like ruby, but I'm interested in learning python. I thought this might be a good time, because PIL looks like a great library to use. However, I don't know how it compares with what Ruby has to offer (e.g. RMagick and ruby-gd). From what I can compile, PIL has better documentation (does ruby-gd even have a homepage?) And more features. Just wanted to hear some opinions to help me decide.

Thanks.

Vince

+4
source share
3 answers

ImageMagic is a huge library and will do everything under the sun, but many of them report memory problems with the RMagick option, and I personally think it will be redundant for my needs.

As you say, ruby ​​gd is a bit thin on the ground when it comes to English documentation .... but GD is a trap for installing on mail platforms, and there is a small wrapper with some useful examples called gruby , which is worth a look. (If you are after alpha transparency, make sure you have installed the latest version of GD lib)

For general community blog support, PIL is the way to go.

+3
source

PIL is a good library, use it. ImageMagic (what RMagick wraps) is a very heavy library that should be avoided if possible. This is useful for local image processing, say, for a batch photo editor, but too inefficient for the ordinary image manipulation tasks for the Internet.

EDIT: In response to a question, PIL supports drawing vector shapes. He can draw polygons, curves, lines, fills and text. I used it in a project to create rounded alpha angles for PNG images on the fly over the Internet. It essentially has most of the features of GDI + (on Windows) or GTK (on Gnome on Linux).

+7
source

PIL has been around for a long time and is very stable, so this is probably a good candidate for your first Python project. The PIL documentation includes a useful tutorial that should speed things up quickly.

+4
source

All Articles