Fix loading of RLE bitmaps in wxBMPHandler

- Fix handling of delta encoding that change vertical position
- Fix handling of end-of-line encodings that are given mid-line
- Removed unnecessary computation for linepos

Add regression tests for the bitmaps using RLE and loading which
previously didn't work correctly.

Closes https://github.com/wxWidgets/wxWidgets/pull/2590

Closes #19318.
This commit is contained in:
David Costanzo
2021-11-17 20:38:43 -08:00
committed by Vadim Zeitlin
parent 94f10eba4e
commit 0985996d01
10 changed files with 41 additions and 18 deletions

View File

@@ -1355,6 +1355,11 @@ void ImageTestCase::BMPFlippingAndRLECompression()
CompareBMPImage("image/horse_rle8.bmp", "image/horse_rle8_flipped.bmp");
CompareBMPImage("image/horse_rle4.bmp", "image/horse_rle4_flipped.bmp");
CompareBMPImage("image/rle8-delta-320x240.bmp",
"image/rle8-delta-320x240-expected.bmp");
CompareBMPImage("image/rle4-delta-320x240.bmp",
"image/rle8-delta-320x240-expected.bmp");
}