4 Jun
2013
4 Jun
'13
4:04 a.m.
2013/6/3 Nathan Hurst <njh@...1927...>
guint8 r;
guint8 g;
guint8 b;
guint8 a;
I would recommend against this approach, instead, use guint8 rgba[4];
and replace
_vertices[i].r = pixels[0];
_vertices[i].g = pixels[1];
_vertices[i].b = pixels[2];
_vertices[i].a = pixels[3];
with for (int p = 0; p < 4; p++) { _vertices[i].rgba[p] = pixels[p]; }
It generally ends up being less work and less error prone.
Done: http://bazaar.launchpad.net/~vinipsmaker/libdepixelize/trunk/revision/2
Only a small change for now. I'll try to do more later today.
--
Vinícius dos Santos Oliveira
https://about.me/vinipsmaker