Magick::Image in gtk

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/