Re: Gdk::Pixbuf::create_from_data => what kind of data ?

On Mon, 2006-03-20 at 11:39 +0100, Alexandre wrote:
> Gdk::Pixbuf::create_from_data
> and
> Gdk::Pixbuf::create_from_xpm_data
> but the fact is I don't understand what kind of data I pass to them...

create_from_data (const guint8* data, Colorspace colorspace, bool
has_alpha, int bits_per_sample, int width, int height, int rowstride)

data should be a pointer like:
unsigned char *pixels = (unsigned char *)malloc (width * height * 3);

has_alpha is probably false, bits_per_sample is usually 8, and rowstride
in this case is width*3


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