| Summary: | BMP loader do not handle big BITMAPINFOHEADER structure | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Patrice Mandin <patmandin> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 1.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Proposed patch | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/44dc7926f62d |
Created attachment 1412 [details] Proposed patch Hello, I encountered a problem trying to load a 8-bit paletted BMP file using SDL. This file was generated using GIMP 2.8. It has a big BITMAPINFOHEADER (0x6c bytes for biSize field), and thus the palette is incorrectly setup. I made this simple patch (that fixes it for my case), I do not know if processing all other stuff from the header is needed. I think the same problem is present in SDL 2.x just having looked at the source code, I did not try.