Re: [gtkmm] Example for Gdk::Pixbuf::create_from_data(...)
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Example for Gdk::Pixbuf::create_from_data(...)
- Date: 14 Jan 2003 18:19:10 +0100
Tobias Roth <roth iam unibe ch> writes:
> I am having trouble to get pixel data from an array into a
> Gdk::Pixbuf and need an example. I am trying to define a
> button that will create an all white 400x300 pixel buffer when
> clicked on (this will emerge into several buttons that apply
> different filters to an image eventually).
I have never tried this, but instead of messing with create_from_data,
I would do something like this:
Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create(...);
pixbuf->fill(0xFFFFFF);
Then there are some methods in Gdk::Pixbuf to retrieve a pointer to
the data and help navigating the pixels.
--
Ole Laursen
http://www.cs.auc.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]