I have a sensor device that give me raw data for an image of 1201 by
861 pixels at 16 bits per pixel.
Although monochromatic, I would like to represent it in an RGB
bitmap. I use an NSInteger [3] to populate the pixels via setPixel.
You should really consider using the vImage framework (part of the
Accelerate framework) to perform this transformation. It is almost
certain to be faster than what you're doing and less prone to errors.