Nope, it’s just a common image, but taking a look at the esphome code on github seems like it is an error in the documentation (there’s no “RGB565” string to be found anywhere in the source…).
Moreover I think that the image type is only related to how the image is embedded in the generated firmware, DisplayBuffer::image() uses it to loop throgh all the pixel and draw them with draw_pixel_at():
void DisplayBuffer::image(int x, int y, Image *image, Color color_on, Color color_off) {
switch (image->get_type()) {
case IMAGE_TYPE_BINARY:
for (int img_x = 0; img_x < image->get_width(); img_x++) {
for (int img_y = 0; img_y < image->get_height(); img_y++) {
this->draw_pixel_at(x + img_x, y + img_y, image->get_pixel(img_x, img_y) ? color_on : color_off);
}
}
break;
case IMAGE_TYPE_GRAYSCALE:
for (int img_x = 0; img_x < image->get_width(); img_x++) {
for (int img_y = 0; img_y < image->get_height(); img_y++) {
this->draw_pixel_at(x + img_x, y + img_y, image->get_grayscale_pixel(img_x, img_y));
}
}
break;
case IMAGE_TYPE_RGB24:
for (int img_x = 0; img_x < image->get_width(); img_x++) {
for (int img_y = 0; img_y < image->get_height(); img_y++) {
this->draw_pixel_at(x + img_x, y + img_y, image->get_color_pixel(img_x, img_y));
}
}
break;
}
}
Actually I don’t know what’s wrong with my project (spoiler: RGB24 doesn’t work, gives a smeared, B&W animation, that’s why I tried with RGB565), problem is RGB565 is used in some sample code in ST7789V docs (https://esphome.io/components/display/st7789v.html).
After your findings this definitely looks like a leftover from those PRs…
I tried a PR, but don’t know if I made it right…
In the mean time I found the culprit of my messy animation: the animated GIF.
After splitting in single frames and then putting them back together, it finally works
If you read the OP, I was trying to display an animated GIF (in my code, that would be beer-pour.gif).
Since it was not showing right, I made several tests to pin down the problem, which led me to try a simple image with type: RGB565, which in turn led to this thread and finding that RGB565 is not supported anymore.
After that, I found the problem in the original GIF not beeing rendered right…