Bug 14999 - WebKit refuses to display incomplete BMP images
Summary: WebKit refuses to display incomplete BMP images
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2007-08-17 13:08 PDT by Peter Kasting
Modified: 2022-07-12 10:50 PDT (History)
5 users (show)

See Also:


Attachments
Incomplete BMP (9.20 KB, image/bmp)
2007-08-17 13:09 PDT, Peter Kasting
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kasting 2007-08-17 13:08:24 PDT
When asked to open an incomplete image, Firefox decodes as much as it can and displays the results; Safari shows a broken image icon.

I think WebCore should only refuse to display the image if nothing can be decoded at all (couldn't connect to server, etc.), or perhaps if the decoder sets m_failed to true (indicating an undecodable image).  For images where the decoder happily decodes as much as it can and we simply never have enough data to transition to FrameComplete, it seems better to show the partial image than nothing.

Test image to be attached shortly.
Comment 1 Peter Kasting 2007-08-17 13:09:32 PDT
Created attachment 16011 [details]
Incomplete BMP

This is a BMP file with the last 100 bytes trimmed off.
Comment 2 mitz 2007-08-17 15:30:01 PDT
In my testing, incomplete JPEGs are displayed. I think behavior may depend on the platform's image decoding capabilities.
Comment 3 Peter Kasting 2007-08-18 00:13:12 PDT
Hmm.  This may be specific to BMPs.  Tested on Safari 3 for Windows.

Certainly if the image decoder doesn't mark the frame status as FramePartial until it's done, we won't have this issue.  And regardless, things will work fine while the image is still being transmitted - this only refers to the behavior once "receivedAllData" is true.
Comment 4 Robert Blaut 2008-02-24 13:37:10 PST
Confirmed problem also on Leopard. Opera also displays the test picture as well as Firefox.
Comment 5 Peter Kasting 2010-04-29 11:25:52 PDT
This still reproduces in Safari/Win 4.0.5.  It does not reproduce in Chromium as I have made the open-source BMPImage* decoder classes behave like Fx/Opera/IE.  (I forget whether I did this pre- or -post-filing this bug.)
Comment 6 Peter Kasting 2010-04-29 11:26:40 PDT
I believe Mark has done some work on image decoding in the past few months.
Comment 7 Radar WebKit Bug Importer 2022-07-12 10:50:50 PDT
<rdar://problem/96898074>
Comment 8 Brent Fulgham 2022-07-12 10:50:54 PDT
This continues to be an issue in Safari 15.