Integer Array Theory

I just thought of a brilliant programming idea. Technically it would be possible to use an integer array to store all the values of an image. The width, height, bits per pixel, and the array of pixels are all already expected to be 32 bit integers. My functions currently require passing the pointer, width, and height to every single function. But if the width and height were just part of the array then only a pointer would need to be passed to each function in addition to the other arguments that a required such as filenames, etc.

But of course that would require a massive rewrite of the thirty or so functions of C code I already have. Probably not worth the trouble but worth mentioning just because theoretically it COULD be done, which is a nice thought.

But I’d probably be better off using classes with C++ if I was to spend that much time on a rewrite. I would call it “BBM++” .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s