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.
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’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.
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.
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™…
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.