Small graphics library?

Hi there,

Does somebody know about a rather small graphics library for Ruby?
RMagick is way to big and complicated to install for my purposes (just
rectangular picture cutting and pasting in PNG images) and additionally
it is complicated to install for Ruby 1.9 on Windows which is a
must-have criterium as the application will be distributed not only on
Linux systems, but also on Windows ones (by means of using OCRA).

Vale,
Marvin

Does somebody know about a rather small graphics library for Ruby?
RMagick is way to big and complicated to install for my purposes (just
rectangular picture cutting and pasting in PNG images) and additionally
it is complicated to install for Ruby 1.9 on Windows which is a
must-have criterium as the application will be distributed not only on
Linux systems, but also on Windows ones (by means of using OCRA).

The only thing I can think of would be to 'wrap' java's built in
graphics2d class.

Some other useful things that come to mind:

···

--
Posted via http://www.ruby-forum.com/\.

http://seattlerb.rubyforge.org/ImageScience.html

does this help? haven't used it myself...

···

On 09/30/2010 01:04 PM, Quintus wrote:

Does somebody know about a rather small graphics library for Ruby?

That one looks really good, but it seems it can't handle the case of
*adding* something to a picture, i.e. suppose I have two images from the
same size, say 10px*10px, and now I want to place the second one below
the first one so I get a 10px*20px image I then save out to disk.
Maybe it's possible to convert the PNG to something simpler first I can
work directly with as a string and afterwards converting the result back
to PNG, but I'd like to do it in a clean way--and for bigger images
converting in such simple formats causes quite big strings I think.
Additionally, the back-and-forth converting itself will take some time
and even if that's not a critical issue in my case, I don't want to do
unnecessary operations like this.

However, I just found a gem that perfectly fits my needs[1]: chunky_png
( chunky_png | RubyGems.org | your community gem host ).

Thanks to everyone!

Vale,
Marvin

[1] The paste problem is accessed by chunky_png by just directly
operating on the pixels. This maybe slow, but seems to me like a very
clean way and chunky_png does not have any external dependencies which
makes it even more attractive to me. However, if you have better ideas,
I'm always open to new suggestions.

···

Am 01.10.2010 04:02, schrieb Joel VanderWerf:

On 09/30/2010 01:04 PM, Quintus wrote:

Does somebody know about a rather small graphics library for Ruby?

http://seattlerb.rubyforge.org/ImageScience.html

does this help? haven't used it myself...