Re: libgnomeprintmm and printing pixbuf.
- From: Murray Cumming <murrayc murrayc com>
- To: Sebastian Vorköper <sv fogman de>
- Cc: gnomemm-list <gnomemm-list gnome org>
- Subject: Re: libgnomeprintmm and printing pixbuf.
- Date: Sat, 16 Apr 2005 02:17:33 +0200
On Sat, 2005-04-16 at 02:10 +0200, Sebastian Vork� wrote:
> 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())
It's very possible that the libgnomeprintmm API is wrong. A patch would
be welcome.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]