Closed
Bug 1707554
Opened 3 years ago
Closed 3 years ago
BMP image is not displayed because of error
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
90 Branch
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: calixte, Assigned: calixte)
Details
Attachments
(2 files)
For context, this image is embedded in a PDF with XFA.
This image is readable in chrome but gimp displays some blue instead of red.
I used the lib (in node): https://github.com/shaozilee/bmp-js
to decode it and then re-encode it, and the new bmp is readable without errors in firefox.
Assignee | ||
Comment 1•3 years ago
|
||
In the few bmps I've the data offset is 0:
https://searchfox.org/mozilla-central/source/image/decoders/nsBMPDecoder.cpp#482
and so we fail here:
https://searchfox.org/mozilla-central/source/image/decoders/nsBMPDecoder.cpp#939
I guess that when dataOffset is not given we could consider the gap length equal to zero.
Assignee: nobody → cdenizet
Assignee | ||
Comment 2•3 years ago
|
||
In some BMP files, data offset is set to 0 and in this case pixel data immediatly follow color table so don't fail in such a case.
Assignee | ||
Updated•3 years ago
|
Status: NEW → ASSIGNED
Pushed by cdenizet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a224bb494905 Decode bmp image where data offset is 0 r=tnikkel
Comment 4•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•