Random error showing an image
- From: Kees Kling <ckling upcmail nl>
- To: gtkmmlist <gtkmm-list gnome org>
- Subject: Random error showing an image
- Date: Mon, 17 Jan 2011 10:26:34 +0100
HI,
in my app I'm loading an pixBuf with the function
image = Gdk::Pixbuf::create_from_file("path and dir of picture);
after the loading I display it with a queue_redraw and in the
expose_event handler it is displayed with
image->scale_simple(image->get_width() - scaleFactor,
image->get_height() - scaleFactor,
Gdk::INTERP_BILINEAR)->render_to_drawable(win,drawingRegion->get_style()->get_black_gc(),
0,0,0,0,image->get_width() - scaleFactor,
image->get_height()- scaleFactor,
Gdk::RGB_DITHER_NONE,0,0);
Normally this goes well, but sometimes I get the error and crash of the
app The errmsg is :
GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `dest_width >
0' failed.
What is causing this error and how to avoid it??
Thanks
Kees Kling
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]