Page 2 of 2

Re: ESP32-S3-EYE_LCD_logo

Posted: Wed Feb 15, 2023 7:29 am
by Yuvaraj1867
Hi,

Thanks. But it is not decoding JPEG to RGB565 format. Here is the output for your reference:

Code: Select all

[1B][0;32mI (428) jped decode: jpeg decode to rgb565, data in 0x3d803604[1B][0m
[1B][0;32mI (479) jped decode: jpeg decode to rgb888, data in 0x3d803604[1B][0m
Tried to print RGB565 values using the below function also the result is not excepted.

Code: Select all

static void print_rgb565_img(uint8_t *img, int width, int height)
{
    uint16_t *p = (uint16_t *)img;
    const char temp2char[17] = "@MNHQ&#UJ*x7^i;.";
    for (size_t j = 0; j < height; j++) {
        for (size_t i = 0; i < width; i++) {
            uint32_t c = p[j * width + i];
            uint8_t r = c >> 11;
            uint8_t g = (c >> 6) & 0x1f;
            uint8_t b = c & 0x1f;
            c = (r + g + b) / 3;
            c >>= 1;
			printf("%" PRIu32 ,c); //"\n"
            //printf("%c", temp2char[15 - c]);
        }
        printf("\n");
    }
}

Re: ESP32-S3-EYE_LCD_logo

Posted: Wed Feb 15, 2023 9:17 am
by WangYX
The decoded data is stored in the corresponding buffer. That is, the address 0x3d803604 shown in the figure.
You can refresh the decoded RGB565 data to the LCD or print it in hexadecimal.