Segfault when saturate_and_pixelate-ing a Gdk::Pixbuf
- From: phan <phanyx o2 pl>
- To: gtkmm-list gnome org
- Subject: Segfault when saturate_and_pixelate-ing a Gdk::Pixbuf
- Date: Wed, 1 Sep 2010 17:05:13 +0200
Hello,
I have a Gdk::Pixbuf created by Gdk::Pixbuf::create_from_inline() method (that is, an image itself is created by gdk-pixbuf-csource utility), and I get a segfault, when trying to saturate_and_pixelate() it. Here's the code:
// raw_pixbuf is the csource image
Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create_from_inline (-1, raw_pixbuf);
if (pixbuf)
pixbuf->saturate_and_pixelate (pixbuf, 0.0, false); // <-- segfault here.
I've also tried sth like this:
Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create_from_inline (-1, raw_pixbuf);
Glib::RefPtr<Gdk::Pixbuf> dest_pixbuf = Gdk::Pixbuf::create_from_inline (-1, raw_pixbuf);
if (pixbuf && dest_pixbuf)
pixbuf->saturate_and_pixelate (dest_pixbuf, 0.0, false);
but it gives me segfault in the same place.
I've tried to manipulate the arguments of the method and it works, when I pass sth like: saturate_and_pixelate (pixbuf, 1.0, false), i.e. "do nothing with the pixbuf". Any other arguments gives segfault.
The pixbuf itself is working - I can successfully use it as a Gtk::StatusIcon. Just the saturate_and_pixelate() part doesn't work. What am I doing wrong?
Regards,
phan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]