libgnomeprintmm and printing pixbuf.
Sebastian Vorköper <[email protected]> Sat, 16 Apr 2005 02:10:52 +0200
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Message-ID | <1113610252.10605.12.camel@localhost> |
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 =3D gdk_pixbuf_get_pixels (pixbuf); gint rowstride =3D gdk_pixbuf_get_rowstride (pixbuf); gint height =3D gdk_pixbuf_get_height (pixbuf); gint width =3D 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=F6per [email protected]