views:

69

answers:

5

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.

A: 

Stay away from ImageMagick if possible, there are other lighter weight ones, ImageScience, DevIL, and so on

banister
A: 

I've had good luck with ImageScience in the past, though really ImageMagick isn't all that bad (if big), and might be what is available on shared hosting.

J Cooper
A: 

The answer might also depend on what other gems you are using. For example, if you use Paperclip for uploading files then it would be better to use ImageMagick as that is the library that Paperclip uses to process files.

sosborn
A: 

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 X*Y, max X*Y, 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...

SundayEdition
I'm doing very basic, 'on-the-fly' thumbnail generation for small sets of images on dedicated server.
Vincent
Your biggest hurdle may likely be installing the required library (if not installed already). ImageMagick seems to be very popular (and featured) so you'll likely find more resources, information, and support on installing and using it than some of the others.If you have difficulty installing ImageMagick, try GraphicsMagick. The difference between the two: http://www.graphicsmagick.org/FAQ.html#how-does-graphicsmagick-differ-from-imagemagickOnce installed, take a look at the RMagick thumbnail example:http://studio.imagemagick.org/RMagick/doc/comtasks.html#thumb
SundayEdition
A: 

If I were you, I would stay away from Rmagick/Imagemagick. I had a similar need in my rails application, to show the activity of user as a graph. I tried and failed to get both Gruff/Scruffy working, both depend on Rmagick. I finally gave up and used jQuery/Flot and it produces beautiful graphs.

Sainath Mallidi