struct pixel
{
unsigned char b;
unsigned char g;
unsigned char r;
};
int length = width * height;
struct pixel data[length];
I don't know how to create that in Python. I've made a class for it, but I don't know how to create the array like that..
class pixel:
def __init__(self, r, g, B)/>:
self.r = r
self.g = g
self.b = b
Is there a simple way to make an array of the class?
Many apologies for posting C code in the Python board.

New Topic/Question
Reply



MultiQuote






|