Forum: Ruby-Gnome 2 Magick::Image in gtk

Posted by David Maciejak (Guest)
on 2007-05-23 15:47
(Received via mailing list)
Hi,

I am experiencing problem to import a Magick::Image in a Gtk::Image to
display it.
I use the to_blob() method from Magick::Image to get the data and pass
it to a Gdk::Pixbuf with

pix=Gdk::Pixbuf.new(blob, Gdk::Pixbuf::ColorSpace::RGB, false, 8,
image_width, image_height, 3*image_width)

Perhaps the problem comes from the last argument 'rowstride' ? how I
can compute it ?

and then I created an Gtk::Image with:

img = Gtk::Image.new
img.pixbuf=pix

Did someone have ever done that ?

thanks,

david

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.