# What's the most common library for Ruby image processing?

**URL:** <https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236>\
**Category:** Ruby\
**Created:** [May 15, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236 "2007-05-15T20:08:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 15, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/1 "2007-05-15T20:08:58Z")

</div>

All,

what’s the most common library for Ruby image processing? What I want to  
do is just compare two images based on pixels.

Thanks

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 15, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/2 "2007-05-15T21:03:39Z")

</div>

On 5/15/07, Yingqi T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> All,
> 
> what’s the most common library for Ruby image processing? What I want to  
> do is just compare two images based on pixels.
> 
> Thanks

The most common seems to be RMagick, which is itself a binding for the  
ImageMagick library.

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 15, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/3 "2007-05-15T21:39:43Z")

</div>

> > what’s the most common library for Ruby image processing? What I want to  
> > do is just compare two images based on pixels.
> 
> The most common seems to be RMagick, which is itself a binding for the  
> ImageMagick library.

There’s also ImageScience, which is obviously set up as an  
alternative. Both have their proponents, I think.

–  
Giles B.

I’m running a time management experiment: I’m only checking e-mail  
twice per day, at 11am and 5pm. If you need to get in touch quicker  
than that, call me on my cell.

Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 16, 2007, 11:34am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/4 "2007-05-16T11:34:45Z")

</div>

On 5/15/07, Giles B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > what’s the most common library for Ruby image processing? What I want to  
> > > do is just compare two images based on pixels.
> > 
> > The most common seems to be RMagick, which is itself a binding for the  
> > ImageMagick library.
> 
> There’s also ImageScience, which is obviously set up as an  
> alternative. Both have their proponents, I think.

Had a look at the homepage, but it seems it’s just a smallish  
thumbnail generator - which is fine, if that’s the only thing you need  
it for. RMagick on the other hand is bigger, but it also does a lot  
more.

– Stoffe

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 18, 2007, 12:00am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/5 "2007-05-18T00:00:41Z")

</div>

Giles B. wrote:

> Hmm, that’s weird. It looks like you’re right, but why do they make  
> such a big deal about being better than ImageMagick when IM gets you  
> such full-featured stuff and ImageScience is so much smaller and  
> focused? I think ThumbnailScience might have made more sense. Why not  
> just call it CleanThumb or something? Is it some ego thing?

Without having ever played with IS, it could be because RMagick  
leaks memory so badly as to make it unusable for a wide variety  
of applications. That’s my experience anyhow. I believe that  
ImageMagick doesn’t have the same problem, but I haven’t tested  
that.

Bigger does not necessarily mean better, though RMagick’s feature  
set is wonderful.

Clifford H…

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 18, 2007, 12:29am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/6 "2007-05-18T00:29:45Z")

</div>

Clifford H. wrote:

> Without having ever played with IS, it could be because RMagick  
> leaks memory so badly as to make it unusable for a wide variety  
> of applications. That’s my experience anyhow. I believe that  
> ImageMagick doesn’t have the same problem, but I haven’t tested  
> that.  
> As of this moment there are no open bug tracks for RMagick memory leaks  
> on RubyForge. All the RMagick “leaks” I know about are addressed in this  
> entry in the RMagick Hints & Tips forum:  
> [http://rubyforge.org/forum/forum.php?thread\_id=1374&forum\_id=1618](http://rubyforge.org/forum/forum.php?thread_id=1374&forum_id=1618).

If you know of a leak that isn’t addressed by that tip, I’d love an  
opportunity to fix it. Would you mind sending me a script that  
reproduces the leak? I need a script with no extra gems or libraries,  
just Ruby and RMagick. No Rails, attachment\_fu, file\_column, gruff,  
scruffy, or whatever. Let me know what O/S you’re on, what version of  
RMagick and ImageMagick/GraphicsMagick, and what version of Ruby. You  
can send it directly to me, post it here, or open a bug track on  
RubyForge.

Thanks very much!

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 17, 2007, 1:47am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/7 "2007-05-17T01:47:37Z")

</div>

> > There’s also ImageScience, which is obviously set up as an  
> > alternative. Both have their proponents, I think.
> 
> Had a look at the homepage, but it seems it’s just a smallish  
> thumbnail generator - which is fine, if that’s the only thing you need  
> it for. RMagick on the other hand is bigger, but it also does a lot  
> more.

Hmm, that’s weird. It looks like you’re right, but why do they make  
such a big deal about being better than ImageMagick when IM gets you  
such full-featured stuff and ImageScience is so much smaller and  
focused? I think ThumbnailScience might have made more sense. Why not  
just call it CleanThumb or something? Is it some ego thing?

–  
Giles B.

I’m running a time management experiment: I’m only checking e-mail  
twice per day, at 11am and 5pm. If you need to get in touch quicker  
than that, call me on my cell.

Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)

---

<div class="post-metadata">

**Author:** ![anakintang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Post date:** [May 18, 2007, 9:15am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236/8 "2007-05-18T09:15:24Z")

</div>

Tim H. wrote:

> As of this moment there are no open bug tracks for RMagick memory leaks  
> If you know of a leak that isn’t addressed by that tip, I’d love an  
> opportunity to fix it. Would you mind sending me a script

Thanks for your support, and when I get back to Australia,  
I’ll retest my script with the latest RMagick before sending  
it if necessary. I’m sorry if I slurred an old version when  
the current version mightn’t deserve it. I had heard of issues  
from a number of others as well, but I can only relate my  
experience (which is admittedly out of date).

It’ll be a month or so, unfortunately - I’m travelling and  
can’t test it here on Mac OSX - the problem was on Debian and  
I think WindowsXP.

Clifford H…
