Handle correct data offset in raw decoder

There is often buffered data ahead of the pixel data so we need to take
this in account when making sure pixels are opaque.
This commit is contained in:
Pierre Ossman 2022-03-28 08:45:40 +02:00
parent 7730814b8d
commit 98664c7887
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ export default class RawDecoder {
// Max sure the image is fully opaque // Max sure the image is fully opaque
for (let i = 0; i < pixels; i++) { for (let i = 0; i < pixels; i++) {
data[i * 4 + 3] = 255; data[index + i * 4 + 3] = 255;
} }
display.blitImage(x, curY, width, currHeight, data, index); display.blitImage(x, curY, width, currHeight, data, index);