assertion GDK_IS_PIXBUF failed



Hello,

I'm currently trying to display an image on the screen. This image is
just an array of pixel that I fill myself, it's not loaded from an
image file.

I've tried two methods which both use a "Glib::RefPtr<Gdk::Pixbuf> m_buffer".

1) m_buffer->render_to_drawable(get_window(),get_style()->get_black_gc(),

0,0,0,0,w,h,Gdk::RGB_DITHER_NONE,0,0);
This method make my program segfault when the image size is too big.
For some sizes it works but when it comes larger it crash and with
debugging I assume it crash at the "render_to_drawable" call.

2) get_window()->draw_pixbuf(get_style()->get_black_gc(),m_buffer,

0,0,0,0,w,h,Gdk::RGB_DITHER_NONE,0,0);
With this method I get a Gdk-CRITICAL message which say
"gdk_draw_pixbuf: assertion GDK_IS_PIXBUF (pixbuf) failed".

Am I doing something wrong ? Is there any known issue to this problem ?
I'm out of ideas :(

Thanks a lot for any answer.
Aurelien



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