ImageScience, Mini-Magick and RMagick

I'm going to be generating thumbnails from user uploaded images. I'm looking around at the libraries available to do this sort of thing and there are three that look promising.

  ImageScience -- http://seattlerb.rubyforge.org/ImageScience.html   Mini-Magick -- http://rubyforge.org/projects/mini-magick/   RMagick -- http://rmagick.rubyforge.org/

It looks like a lot of people are seeing problems with memory usage if they are invoking RMagick often. Mini-Magick looks like it's wrapping the command line and invoking ImageMagick which should be pretty fast. ImageScience is using FreeImage and people say it's pretty fast and isn't too hard on the server.

All things being equal, what have you had success with? Has anyone run into any real gotcha's with any of these libraries?

Thanks, -- Miles

If all you want to do is resize photos then use ImageScience. - Richard

If all you want to do is resize photos then use ImageScience. - Richard

I'm going to be generating thumbnails from user uploaded images. I'm looking around at the libraries available to do this sort of thing and there are three that look promising.

ImageScience -- http://seattlerb.rubyforge.org/ImageScience.html Mini-Magick -- http://rubyforge.org/projects/mini-magick/ RMagick -- http://rmagick.rubyforge.org/

It looks like a lot of people are seeing problems with memory usage if they are invoking RMagick often. Mini-Magick looks like it's wrapping the command line and invoking ImageMagick which should be pretty fast. ImageScience is using FreeImage and people say it's pretty fast and isn't too hard on the server.

All things being equal, what have you had success with? Has anyone run into any real gotcha's with any of these libraries?

I haven't used ImageScience, but my memory is that if you want to do things like watermark/drop shadows (ala flex image plugin) you can't. But if you don't then it's the WayToGo(tm)...

-philip

rmagick - Loves memory. I haven't seen it leak necessarily, just jump up in memory until the garbage collector runs.

minimagick - I've seen reports with a race condition with temp files: http://ar-code.lighthouseapp.com/projects/35/tickets/6-race-condition-with-temp_file . Basically, if garbage collection runs during a large operation, it can delete some of the tempfiles while you're still using them. This should just require a quick update to the gem though, so it's not a huge deal.

imagescience - works great if all you need is basic cropping and resizing. I implemented the imagemagick geometry strings in my attachment_fu. I've noticed it's not as flexible as imagemagick though, bombing on certain gifs or jpegs only.

Thank you all for the responses. :slight_smile:

I have been doing some more research myself and I'm going to try ImageScience. All I need to do is resize the image and based on what I'm hearing, it's the best solution for this so far. I'll post again if I run into any interesting problems.

Thanks again, -- Miles

Thank you all for the responses. :slight_smile:

I have been doing some more research myself and I'm going to try ImageScience. All I need to do is resize the image and based on what I'm hearing, it's the best solution for this so far. I'll post again if I run into any interesting problems.

Thanks again, -- Miles

Thank you all for the responses. :slight_smile:

I have been doing some more research myself and I'm going to try ImageScience. All I need to do is resize the image and based on what I'm hearing, it's the best solution for this so far. I'll post again if I run into any interesting problems.

Thanks again, -- Miles

Thank you all for the responses. :slight_smile:

I have been doing some more research myself and I'm going to try ImageScience. All I need to do is resize the image and based on what I'm hearing, it's the best solution for this so far. I'll post again if I run into any interesting problems.

Thanks again, -- Miles