fixed 9.7" image wrapping

This commit is contained in:
Nic Limper
2023-12-31 02:17:26 +01:00
parent 5973607ad7
commit 12f91fb293
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
{
"name": "EL097H2WRN 9.7\"",
"width": 960,
"height": 672,
"rotatebuffer": 0,
"bpp": 2,
"colors": 3,
"colortable": {
"white": [255, 255, 255],
"black": [0, 0, 0],
"red": [255, 0, 0],
"gray": [150, 150, 150]
},
"shortlut": 0,
"options": ["button"],
"contentids": [ 0, 1, 2, 3, 4, 8, 16, 9, 7, 19, 10, 11, 21 ],
"usetemplate": 1
}

View File

@@ -142,7 +142,7 @@ void spr2color(TFT_eSprite &spr, imgParam &imageParams, uint8_t *buffer, size_t
}
uint8_t bitIndex = 7 - (x % 8);
uint16_t byteIndex = (y * bufw + x) / 8;
uint32_t byteIndex = (y * bufw + x) / 8;
// this looks a bit ugly, but it's performing better than shorter notations
switch (best_color_index) {