Re: libgnomeprintmm and printing pixbuf.
Murray Cumming <[email protected]> Sat, 16 Apr 2005 02:17:33 +0200
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 2005-04-16 at 02:10 +0200, Sebastian Vork=C3=B6per wrote: > Hello, >=20 > i'm working with libgnomeprintmm-2.5.1 lately and couldn't figure out > how to print pictures (pixbufs). >=20 > I know how to do it with "normal" libgnomeprint. >=20 > So with libgnomeprint i would do: >=20 > 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); >=20 > gnome_print_rgbimage (context, (char *) raw_image, width, height, > rowstride); >=20 > 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" ? >=20 > context->rgb_image( ??? , pixbuf->get_width(), pixbuf->get_height(), > pixbuf->get_rowstride()) It's very possible that the libgnomeprintmm API is wrong. A patch would be welcome. --=20 Murray Cumming [email protected] www.murrayc.com www.openismus.com