Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 1943 - Wrong handling of legacy 32bpp BMP files
Kang Seonghoon While BMP format supports alpha channel, it is enabled only when the header is at least 56 bytes long (BITMAPV3INFOHEADER and later). For very common 40-byte-long header (BITMAPINFOHEADER) 32bpp format should be interpreted as BGRX format, but currently SDL interprets them as BGRA format and causes a significant compatibility problem as many 32bpp files use a padding byte of 0 ("transparent" in BGRA interpretation). --- I fixed this by checking to see if the alpha channel is all 0, and if so, setting it opaque.
- Loading branch information
Showing
1 changed file
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters