Open Bug 1610106 Opened 6 years ago Updated 3 years ago

BMP file created in Adobe Photoshop doesn't open

Categories

(Core :: Graphics: ImageLib, defect, P3)

74 Branch
defect

Tracking

()

Tracking Status
firefox-esr68 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- fix-optional

People

(Reporter: krzysztof.glebowicz, Unassigned, NeedInfo)

References

(Regression)

Details

(5 keywords)

Attachments

(1 file)

Attached image BMP Test File

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0

Steps to reproduce:

  1. Open the attached BMP file in a new tab. It is a 16-bit 565 RGB BMP file produced by Adobe Photoshop!
  2. The image doesn't open, there's only error info.

Actual results:

This is the file from this SUMO thread: https://support.mozilla.org/en-US/questions/1277446

User claims that this is a regression in a recent release and previously he could open files of this format in Firefox.

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
20200118092217

This regression is half a decade old. mozregression-gui is therefore unable to narrow the range further.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2387ada864282880d3a498d643abe3d8b887ee59&tochange=e193b4da0a8c1025aa76a403c64663ff1cd41709

Only two bugs match BMP in that regression range: bug 1204394 and bug 1213613. The latter looks like the culprit, since it touches 16-bit BMPs.

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → ImageLib
Ever confirmed: true
Product: Firefox → Core
Regressed by: 1213613
Summary: BMP files created in Adobe Photoshop doesn't open → BMP file created in Adobe Photoshop doesn't open
Flags: needinfo?(tnikkel)
Priority: -- → P3

Hi,

I'm able to reproduce this issue on Windows 10 for Firefox version Nightly 74.0a1 (2020-01-23) (64-bit) - Beta 73.0b8 (64-bit) - Release 72.0.2 (64-bit). Marking those flags as affected.

Looking at the bmp headers for this file, we fall in the BITMAPV3INFOHEADER category:
https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_(bitmap_information_header)
with some compression and so consequently we fail here:
https://searchfox.org/mozilla-central/source/image/decoders/nsBMPDecoder.cpp#618

:tnikkel, is it something we want to fix ? If yes, I can do it I think, so assign me this bug.

(In reply to Calixte Denizet (:calixte) from comment #3)

:tnikkel, is it something we want to fix ? If yes, I can do it I think, so assign me this bug.

We would accept a patch but it's very low on the priority list as a user coming across one of these bmps in exceedingly rare.

I think there may actually be a patch in bug 651482 for that issue, it just didn't get pushed over the finish line.

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: