6 years ago
Hi :),
is there a short and fast function to convert the RGB565 to RGB888 and back again?
NEW 6 years ago
There is https://gamebuino.com/academy/reference/gb-createcolor for going from rgb888 to rgb565.
I see rgb565Torgb888
in Misc.cpp to go the other way, but I'm guessing it was written assuming it would only be used internally in the library.
NEW 6 years ago
Thats no problem.
I have an ESP32 with a OV7670 Camera.
The Camera only outputs RGR565, but for me its easier to work with RGB888 Values.
NEW 6 years ago
Well, you can always use the method aoniell pointed out by pre-declaring it.
EDIT:
something like this should do (untested):
#include <utils/Misc.h> // and then Gamebuino_Meta::RGB888 rgb = Gamebuino_Meta::rgb565Torgb888(0x1234); rgb.r; // red rgb.g; // green rgb.b; // blue