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

[pygame] 4-byte surfarray



Hello,

I have problem that I hope is easy to solve.

For some font manipulation I render a font with pygame (fine rendering!)
and copy the result on a 3d-array. The resulting array is 3byte (RGB),
but I want it to be 4byte (RGBA). If needed, I can add the alpha later, 
but the array must be 4byte. Can that be done?

letter = font.render(...)
a=surfarray.array3d( letter ) #I want this 4byte, not 3

Thanks,
Fulko