This commit is contained in:
Thuc Chi Do
2025-08-11 04:33:14 -04:00
parent 50cdb1514b
commit 69d572dd81

View File

@@ -27,6 +27,15 @@ void flushBuffs(u8 *buf) {
buf = malloc(BUFSIZE); buf = malloc(BUFSIZE);
} }
void getColor(void *fb, int row, int col) {
u8 *fb_8 = (u8*) fb;
u32 v = ((HEIGHT - col) + (row*HEIGHT)) * 3;
uint8_t r = fb_8[v];
uint8_t g = fb_8[v+1];
uint8_t b = fb_8[v+2];
printf("\n---RGB2---%u %u %u\n", r, g, b);
}
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
u8 *buf = malloc(BUFSIZE); u8 *buf = malloc(BUFSIZE);