Closed
Description
Describe the bug
OIIO fails to import BMPs correctly when the bits per sample is less than 8. For example this attached image I think is 565 (zipped as github won't let me upload a bmp).
iinfo states that oiio:BitsPerSample is 4. The code here seems to mask for 555 but then shift as if it's 444. I notice that the DibInformationHeader class has red/green/blue_mask members, but they don't seem to be used.
Even assuming the correct masking and shifting was being done, the data should probably be rescaled to 8 bit anyway.
Loading the image in the zip I get this:
wheras I expect it to look like this:
Platform information:
- OIIO branch/version: 2.2.9
- OS: windows 10
- C++ compiler: msvc
- Any non-default build flags when you build OIIO:
Metadata
Metadata
Assignees
Labels
No labels