Emans
Member
"I'm once again asking for your [financial] support"
Hi everyone, I'm back on this forum.
Last time I asked some questions about a RA8875 display, and after solving the problem (many many thanks to the guys who guided me) I'm ready to implement the system in its final destination... or that's what I thought.
A new challenger approached: the UI layout.
After ditching the idea to use the standard RA8875.h draw functions to make my own graphics (since it's a bit too cumbersome and little polished I'm leaving it as a last resort), I've tried the BMP-file-on-SD approach, with discrete success...
I still have not managed to make the RA8875 on-board SD slot to work via SPI, but the Teensy 4.1 integrated one works like a charm, and the loading times for a 480x272 (~250 ms) is good enough for a one-time loaded image (on startup).
The only problem is that the SDTest example file (alert.bmp) is a 24-bit file and the display is only capable of displaying 16-bit colors, and the result is a completely wrong colour (but with the correct shading).
If I try to feed a BMP RGB565 (or any other Bitmap 16-bit formats such as A1RGB555 or X1RGB555) to the example code, it triggers this
part of the code, displaying "BMP format not recognized".
I also found that changing
to
does not trigger the BMP invalid format condition, and displays the image like in the attached photo (incorrectly). Every value between 0 and 2 triggers the invalid format warning. If I get it right, a value of 0 means an uncompressed image, a 1 or a 2 means a RLE compressed file?
Also, converting the 24-bit to 16-bit 565 with ImageMagick ended the same way as exporting the file through GIMP in RGB565 format, which means a garbage and almost monochromatic image.
I'm currently seeking any advice possible on how to read and correctly display these type of images, the easier the better...
( Reference for the photos: alert.bmp is 24-bit, alert1.bmp is the 16-bit RGB one, alert.jpg is the original test image)
Hi everyone, I'm back on this forum.
Last time I asked some questions about a RA8875 display, and after solving the problem (many many thanks to the guys who guided me) I'm ready to implement the system in its final destination... or that's what I thought.
A new challenger approached: the UI layout.
After ditching the idea to use the standard RA8875.h draw functions to make my own graphics (since it's a bit too cumbersome and little polished I'm leaving it as a last resort), I've tried the BMP-file-on-SD approach, with discrete success...
I still have not managed to make the RA8875 on-board SD slot to work via SPI, but the Teensy 4.1 integrated one works like a charm, and the loading times for a 480x272 (~250 ms) is good enough for a one-time loaded image (on startup).
The only problem is that the SDTest example file (alert.bmp) is a 24-bit file and the display is only capable of displaying 16-bit colors, and the result is a completely wrong colour (but with the correct shading).
If I try to feed a BMP RGB565 (or any other Bitmap 16-bit formats such as A1RGB555 or X1RGB555) to the example code, it triggers this
C-like:
//previous code
if ((bmpDepth == 16) && (read32(bmpFile)) == 0) {
//rest of code here
}
//some } from previous conditions
bmpFile.close();
if (!goodBmp) {
Serial.println("BMP format not recognized.");
//else condition
}
I also found that changing
C-like:
(read32(bmpFile)) == 0)
C-like:
(read32(bmpFile)) == 3)
Also, converting the 24-bit to 16-bit 565 with ImageMagick ended the same way as exporting the file through GIMP in RGB565 format, which means a garbage and almost monochromatic image.
I'm currently seeking any advice possible on how to read and correctly display these type of images, the easier the better...
( Reference for the photos: alert.bmp is 24-bit, alert1.bmp is the 16-bit RGB one, alert.jpg is the original test image)