One of the checks for 1bpp RLE bitmaps was inadvertently removed.
Created attachment 557190 [details] [diff] [review]
RLE4 1BPP was intentionally removed.
The new way it works is correct according to the spec.
Even know we allowed RLE4 1BPP before since 2002, I think that it is better to have correct handling based on the spec and authoritive source (MSDN).
- IE9, Windows photo viewer, and MSPaint can't read this bitmap
- Wikipedia says: "BI_RLE4 RLE 4-bit/pixel Can be used only with 4-bit/pixel bitmaps" (http://en.wikipedia.org/wiki/BMP_file_format)
- This wotsit document http://www.edm2.com/0107/os2bmp.html says "BCA_RLE4 - Run-length encoded, 4 bits/pixel
- MSDN says "Windows supports formats for compressing bitmaps that define their colors with 8 or 4 bits-per-pixel. "
Does not say 1 BPP which we used to allow.
I think this should be WONTFIX.
(In reply to Brian R. Bondy from comment #2)
> RLE4 1BPP was intentionally removed.
Then you should have done it properly.
> Then you should have done it properly.
Understood, my bad.
I intentionally didn't specify 1BPP, but didn't realize I had changed the logic there. I understand that in the future I should put a separate bug and fix for such a situation though.
Comment on attachment 557190 [details] [diff] [review]
If it is the case that this is the only change we need to support 1bpp RLE bitmaps, I think we should support them. I wasn't entirely aware that this was being removed with the other patches, though I should've.
Neil since we are going to continue supporting this, could you please add the reference image you sent me to Bug 683205? I'll make sure to put a reftests for RLE4 1BPP. I can't find the link any more that you sent me earlier.
Never mind I found the link, I'll add it.
Pushed changeset 84233d215c4e to mozilla-central.