Hi,
I’m trying to port an openFrameworks GIF Encoder addon to a Cinder block.
I’m nearly there, how can I create an unsigned char * from a Surface8u ?
Do I have to loop on each pixel like this ?
Hi,
I’m trying to port an openFrameworks GIF Encoder addon to a Cinder block.
I’m nearly there, how can I create an unsigned char * from a Surface8u ?
Do I have to loop on each pixel like this ?
You can get at the raw data with the getData()
method on SurfaceT
, though you’ll have to be careful with channels. You could also use Surface::Iter
s if you want to go pixel by pixel. I guess you need to check what the data layout needs to be for the encoder.
cheers,
Rich