mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibGfx: Add BMP loader
Adds an *almost fully featured BMP loader to process .bmp files. Features: - All header formats are supported - Full RLE4/8/24 support - Color scaling (e.g. distributing a 5-bit color throughout the 8-bit color spectrum, so 5-bit white is still 0xffffff) - Full BITMASK/ALPHABITMASK support *Not included: - 1D Huffman compression. Good luck actually finding a bmp in the wild that uses this - Use of any field in the V4/V5 header. Color spaces? Endpoints? No thanks :) This loader was tested with the images at https://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html. This loader correctly displays 81 out of the 90 total images (for reference, firefox displays 64 correctly). Note that not rendering the images at the bottom is counted as displaying correctly.
This commit is contained in:
committed by
Andreas Kling
parent
dfe5b232f4
commit
4e093a7c23
1315
Libraries/LibGfx/BMPLoader.cpp
Normal file
1315
Libraries/LibGfx/BMPLoader.cpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user