Closed codinglynpan closed 6 months ago
It is not a typo. Your method reduces the color depth by an additional 1 bit from 16 to 15 bit.
The RGB565 format gives the green channel an extra bit compared to the red and blue channels because the human eye is more sensitive to variations in green than it is to variations in red and blue. This additional bit for the green channel allows for a finer gradation of green shades, which results in a better overall image quality, given the limited 16-bit color depth.
However, I see how your approach could provide a more subjectively pleasing color representation by decreasing the color depth in a more uniform manner.
My utility is a very simple entry level conversion from RGB888 to RGB565. There can be color distortion any time you reduce the color depth.
There are more advanced approaches:
These advanced approaches are outside the scope of this project. However, if I have the time, I could probably use NumPy to incorporate some gamma correction and add a switch for uniform conversions.
In this python code: img2rgb565.py I am puzzled why the RGB conversion is like this:
Is this a typo? I changed the code to this and the colors look way much better on my CYD display.