Closed
Bug 206312
Opened 22 years ago
Closed 22 years ago
16 color bmp not recognized (attachments of bug 196977)
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
People
(Reporter: mnyromyr, Assigned: neil)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
814 bytes,
patch
|
Biesinger
:
review+
tor
:
superreview+
mkaply
:
approval1.4+
|
Details | Diff | Splinter Review |
[carrying over remaining issues from bug 204994 after the crash is fixed.]
With 2003-05-19-04, the 16 color BMPs attached to bug 196977
(http://bugzilla.mozilla.org/attachment.cgi?id=116919&action=view
http://bugzilla.mozilla.org/attachment.cgi?id=116921&action=view )
do not display properly, an error page is shown instead:
"The image “[URL from above]” cannot be displayed, because it contains errors."
Both 256 color BMPs display correctly (AFAICT).
This is regression that goes back at least to 2003-04-10, where the loading of
*any* of these four BMPs crashes Mozilla (-> see bug 204994), whereas in
2003-04-04, *all four* BMPs are displayed correctly.
Be sure to have your cache cleared before testing this bug!
Comment 1•22 years ago
|
||
We hit the if in here and therefore return a failure:
(around line 584 in nsBMPDecoder.cpp)
if (mAlphaPtr + mStateData > mAlpha + mBIH.width) {
// We can work around bitmaps that specify one
// pixel too many, but only if their width
is odd.
mStateData -= mBIH.width & 1;
if (mAlphaPtr + mStateData > mAlpha +
mBIH.width) {
return NS_ERROR_UNEXPECTED;
Assignee | ||
Comment 2•22 years ago
|
||
The padding calculation didn't work for RLE4 because the data is in pixels, not
bytes. Truth table for padding calculation begins:
Pixels RLE8(1) RLE4(2)
1(=>0) Yes Yes
2(=>1) No Yes
3(=>2) Yes No
4(=>3) No No
(etc) so after I subtract 1, the No entries will have the appropriate bit set.
Assignee | ||
Updated•22 years ago
|
Attachment #123873 -
Flags: superreview?(tor)
Attachment #123873 -
Flags: review?(cbiesinger)
Comment 3•22 years ago
|
||
Comment on attachment 123873 [details] [diff] [review]
Proposed patch
thanks a lot for figuring this out, r=biesi, but please add the table of your
last comment as a comment in the file.
Attachment #123873 -
Flags: review?(cbiesinger) → review+
Comment 4•22 years ago
|
||
-> neil who made the patch
Assignee: cbiesinger → neil.parkwaycc.co.uk
OS: Windows 2000 → All
Hardware: PC → All
Comment on attachment 123873 [details] [diff] [review]
Proposed patch
sr=tor, but definitely add that table as a comment. I get the feeling
you're being too clever with the logic there, but not sure an unfolded
version would be much clearer. Probably worth asking for 1.4 approval
for this.
Attachment #123873 -
Flags: superreview?(tor) → superreview+
Assignee | ||
Comment 6•22 years ago
|
||
Comment on attachment 123873 [details] [diff] [review]
Proposed patch
Low risk patch to fix a regression caused by a fix to a crasher bug. Only
affects some RLE4 bitmaps.
Attachment #123873 -
Flags: approval1.4?
Comment 7•22 years ago
|
||
Comment on attachment 123873 [details] [diff] [review]
Proposed patch
a=mkaply for checkin to 1.4
Attachment #123873 -
Flags: approval1.4? → approval1.4+
Assignee | ||
Comment 8•22 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•