Open Bug 622614 Opened 14 years ago Updated 2 years ago

Firefox can't handle BMP which is in format OS/2 version 2

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

People

(Reporter: hesslow, Unassigned)

Details

Attachments

(3 files, 3 obsolete files)

Attached image Image Firefox don't handle (obsolete) —
Found the attached image on: http://wvnvaxa.wvnet.edu/vmswww/bmp.html

In Chrome: Works
In IE9 Beta: Don't render the image at all

According to Wikipedia: http://en.wikipedia.org/wiki/BMP_file_format BITMAPCOREHEADER2 is 64 in size.

Now I'm just guessing but looking at http://mxr.mozilla.org/mozilla-central/source/modules/libpr0n/decoders/nsBMPDecoder.cpp it only seems to handle Windows (size 40) and OS/2 version 1 (size 12).

I guess OS/2 version 2 is not a very used format. But shouldn't the code check if the Header Length is something other then 40 and 12 and if so not decode the image. Now when it only handle those to formats. Instead of trying to parse the OS/2 version 2 format as a Windows format and the image looks strange.

Wasn't able to open the image in Paint.NET so I could save it as a PNG. But I took a PrintScreen from Chrome and saved it as PNG which I will attach.
Looks like Bugzilla destroyed the BMP-image. The image still exists on http://wvnvaxa.wvnet.edu/vmswww/bmp.html listed as OS/2 version 2 so if someone knows how to attach it without Bugzilla changing it please do.
Attachment #500849 - Attachment mime type: image/png → image/bmp
Attachment #500849 - Attachment mime type: image/bmp → image/png
Attached image testcase (obsolete) —
Attachment #500855 - Attachment mime type: image/png → image/bmp
Attached image testcase again (obsolete) —
Attachment #500855 - Attachment is obsolete: true
Attached file zipped testcase
odd, bugzilla does indeed force the image to image/png, even if I enter image/bmp as the mimetype when I upload it. (The image is also changed somehow such that if I download it with wget, the md5sum is different from the original.)

Anyway, here's the bmp file zipped up, so we have it saved somewhere -- hopefully bugzilla won't break the zip file. :)
Attachment #500849 - Attachment is obsolete: true
Attachment #500858 - Attachment is obsolete: true
Attached image How it looks in Firefox
Here's how it looks in Firefox (trunk & 3.6.x) on my machine. Opera (ver 11.00) actually matches Firefox's rendering, FWIW.

However: Gimp and Eye of GNOME (default Ubuntu image viewer) match the Chrome/Webkit rendering.
OS: Windows 7 → All
Hardware: x86 → All
Version: 1.9.2 Branch → Trunk
Firefox's behavior is consistent at least as far back as 3.0.x
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.19pre) Gecko/2010060904 GranParadiso/3.0.19pre
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: