libgnomeprintmm and printing pixbuf.



Hello,

i'm working with libgnomeprintmm-2.5.1 lately and couldn't figure out
how to print pictures (pixbufs).

I know how to do it with "normal" libgnomeprint.

So with libgnomeprint i would do:

guchar *raw_image = gdk_pixbuf_get_pixels (pixbuf);
gint rowstride = gdk_pixbuf_get_rowstride (pixbuf);
gint height = gdk_pixbuf_get_height (pixbuf);
gint width = gdk_pixbuf_get_width (pixbuf);

gnome_print_rgbimage (context, (char *) raw_image, width, height,
rowstride);

But how to do it with libgnomeprintmm?
Or better: How would i create a "const Glib::ustring& data" out of
"guint8* Gdk::Pixbuf::get_pixels  (  )   const" ?

context->rgb_image( ??? , pixbuf->get_width(), pixbuf->get_height(),
pixbuf->get_rowstride())



Thanks in advance,
Sebastian Vorköper
sv fogman de





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]