image printing

2010-07-23 Thread Alexander Kuleshov
Hello, I need to print image in my gtk+ application. I have code: GList* list; void begin_print (GtkPrintOperation * oper, GtkPrintContext * context, gint nr, gpointer user_data) { GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(home/shk/photo.jpg, NULL); list =

Re: image printing

2010-07-23 Thread Claudio Saavedra
On Fri, 2010-07-23 at 22:50 +0700, Alexander Kuleshov wrote: GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file(home/shk/photo.jpg, NULL); You are missing a '/' in the path. Claudio ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Re: image printing

2010-07-23 Thread Tadej Borovšak
Hi. You need to unref your pixbuf only after it has been rendererd to cairo context, since GList will not take ownership of it. Call _unref() just after cairo_paint() call and you should be fine. Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com