Closed Bug 683610 Opened 13 years ago Closed 13 years ago

Restore support for 1bpp RLE bitmaps

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

(Keywords: regression)

Attachments

(1 file)

One of the checks for 1bpp RLE bitmaps was inadvertently removed.
Attached patch Proposed patchSplinter Review
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.
(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.
Pushed changeset 84233d215c4e to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: