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



John C. Spray a écrit :
> 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);
Thank you for the answear

Shame on shame on me shame on me !!!
I'm on this problems for hours and you just opened my eyes...
that was a problem of malloc ! the memory where the pict was, was (not
really) allocated by Magick++ class ! Seems it's not on the heap !
So I needed to malloc a new part of memory and copy the memory from
Magick++ (blob) and now it works !

thank you again !

Alexandre




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