[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Win32 graphics library

Joe Cheng

9/25/2003 4:25:00 AM

Hi Rubyists,

Is there a Ruby library out there for Win32 that will do simple image
manipulations? Specifically I want to resize (with high quality resampling)
and rotate JPG or PNG files.

If not... would it be possible to make calls to GDI+ using Win32API?

Any hints would be greatly appreciated!

thanks,
jmc


3 Answers

Rodrigo B. de Oliveira

9/25/2003 12:37:00 PM

0

You can get full access to the .net framework System.Drawing namespace (and
thus at least part of GDI+) through one of the rubydotnet bridges.

Don''t know if System.Drawing.Image provides the high quality operations
you''re looking for though.

[]s,
Rodrigo

----- Original Message -----
From: "Joe Cheng" <code@joecheng.com>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Thursday, September 25, 2003 1:40 AM
Subject: Win32 graphics library


> Hi Rubyists,
>
> Is there a Ruby library out there for Win32 that will do simple image
> manipulations? Specifically I want to resize (with high quality
resampling)
> and rotate JPG or PNG files.
>
> If not... would it be possible to make calls to GDI+ using Win32API?
>
> Any hints would be greatly appreciated!
>
> thanks,
> jmc
>
>
>
>


Joe Cheng

9/25/2003 1:19:00 PM

0

> You can get full access to the .net framework System.Drawing namespace
(and
> thus at least part of GDI+) through one of the rubydotnet bridges.
>
> Don''t know if System.Drawing.Image provides the high quality operations
> you''re looking for though.

Thanks for the suggestion. Yes, System.Drawing would be more than adequate.
GDI+''s resampling algorithms are very high-quality, as far as these eyes can
tell (I used them for my wedding photos website). And I guess there is a
higher chance of people having the .NET framework already installed than
cygwin/*Magick. Still, for those that don''t, a 25MB download is pretty
painful...

I''m going to look into writing a simple Ruby extension in C that wraps the
GDI calls I need. It''d be really nice to just have this tiny DLL that ships
alongside an exerb-ed Ruby program...

Thanks,

jmc


eg

9/26/2003 7:26:00 AM

0

Joe Cheng wrote:
>
> Thanks for the suggestion. Yes, System.Drawing would be more than adequate.
> GDI+''s resampling algorithms are very high-quality, as far as these eyes can
> tell (I used them for my wedding photos website). And I guess there is a
> higher chance of people having the .NET framework already installed than
> cygwin/*Magick. Still, for those that don''t, a 25MB download is pretty
> painful...
>

The quality options may be there, but it is very slow. Much of GDI+ is
not hardware accelerated... apparently to be rectified come Longhorn..