Restore support for 1bpp RLE bitmaps

RESOLVED FIXED

Status

()

Core
ImageLib
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.07 KB, patch
Joe Drew (not getting mail)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

6 years ago
One of the checks for 1bpp RLE bitmaps was inadvertently removed.
(Assignee)

Comment 1

6 years ago
Created attachment 557190 [details] [diff] [review]
Proposed patch
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #557190 - Flags: review?(joe)
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. "
  http://msdn.microsoft.com/en-us/library/dd183383(v=VS.85).aspx
  Does not say 1 BPP which we used to allow.

I think this should be WONTFIX.
(Assignee)

Comment 3

6 years ago
(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]
Proposed patch

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.
Attachment #557190 - Flags: review?(joe) → review+
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.
(Assignee)

Comment 9

6 years ago
Pushed changeset 84233d215c4e to mozilla-central.
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Blocks: 683799
No longer blocks: 683799
You need to log in before you can comment on or make changes to this bug.