mirror of
https://github.com/YuzuZensai/MCUFRIEND_kbv.git
synced 2026-01-06 04:32:38 +00:00
display 32-bit BMP files
This commit is contained in:
@@ -217,10 +217,12 @@ uint8_t showBMP(char *nm, int x, int y)
|
||||
r = 0;
|
||||
}
|
||||
switch (bmpDepth) { // Convert pixel from BMP to TFT format
|
||||
case 32:
|
||||
case 24:
|
||||
b = sdbuffer[buffidx++];
|
||||
g = sdbuffer[buffidx++];
|
||||
r = sdbuffer[buffidx++];
|
||||
if (bmpDepth == 32) buffidx++; //ignore ALPHA
|
||||
color = tft.color565(r, g, b);
|
||||
break;
|
||||
case 16:
|
||||
|
||||
@@ -231,10 +231,12 @@ uint8_t showBMP(char *nm, int x, int y)
|
||||
r = 0;
|
||||
}
|
||||
switch (bmpDepth) { // Convert pixel from BMP to TFT format
|
||||
case 32:
|
||||
case 24:
|
||||
b = sdbuffer[buffidx++];
|
||||
g = sdbuffer[buffidx++];
|
||||
r = sdbuffer[buffidx++];
|
||||
if (bmpDepth == 32) buffidx++; //ignore ALPHA
|
||||
color = tft.color565(r, g, b);
|
||||
break;
|
||||
case 16:
|
||||
|
||||
Reference in New Issue
Block a user