I've got a numpy array which represents a bunch of RGB values. I'd like to save them as a RGB 565 png image, which I'll then use as a THREE.js texture. How can I do this using Python?
Do I just need to write out an appropriate 16-bit greyscale image? I.e., convert the R, G and B values to 5, 6 and 5 bit numbers and then add them binary? Is there a better way of doing it? I'v been using pypng so far to write 8 bit RGB pngs.