Re: gdk_pixbuf error


sebastien geffroy <seb ekinos com> writes:

> I've got a problem with gdk-pixbuf. I want to load and display png and
> jpg images. So i use gdk_pixbuf_new_from_file. Images are loading.
> But, i want to dysplay them, so i use 
> gdk_pixbuf_render_to_drawable(img, drawingarea->window,
> 								drawingarea->style->fg_gc[GTK_STYLE_NORMAL],
> 								0, 0, 0, 0,
> 								gdk_pixbuf_get_width(img),
> 								gdk_pixbuf_get_heght(img),
> 								GDK_RGB_DITHER_NORMAL, 0, 0);
> where img is my GdkPixbuf images and drawingarea is a GtkDrawingArea,
> but it goes in seg fault. I run gdb to look where it's fault, and it's
> just in this function.

please don't send questions about usage of GTK+ to the gtk-devel-list.
This list is to discuss the development of GTK+. Questions such as 
yours belong to gtk-list or gtk-app-devel-list.

> What's wrong with my code ?

is the drawing area realized? Otherwise drawingarea->window is NULL.

Salut, Sven

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