GdkPixmap and GdkPixbuf



Hi,

after following the scribble example on the Gtk tutorial I try to save
the image produced. Looking on the documentation of GdkPixbuf I found
I could use the following which however gives me a segmentation fault
in my program.

static GdkPixmap *pixmap = NULL;
gdk_pixbuf_save(GDK_PIXBUF(pixmap), "temp.bmp", "bmp", NULL);

I know that pixmap is of type of GdkPixmap and that arg 1 of the
function must be a GDK_PIXBUF and hence the cast. But as I said I am
getting a segmentation fault. Any clues why? Or what I should do to
save the image?

Cheers
y.



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