Fill with gray pixels for partially rendered images
Categories
(Core :: Graphics: ImageLib, enhancement)
Tracking
()
People
(Reporter: saschanaz, Unassigned)
Details
Attachments
(1 obsolete file)
Currently partially decoded JPEG images are filled with white pixels, if such image is not encoded in a progressive format. It would be nice if we can use black pixels on dark mode instead.
For example, it's sometimes annoying if you load a high resolution non-progressive JPEG file served from an abroad Mastodon server that is not cached by any CDN. Clicking such image would temporarily fill your mobile screen with bright white pixels.
| Reporter | ||
Updated•4 months ago
|
Comment 1•4 months ago
|
||
Bug 1556156 is the bug to draw these pixels as transparent like we used to before webrender. It needs some work on the web render side to work.
Here is the place where we clear to white
https://searchfox.org/firefox-main/rev/f6385e6644d5d4343d33b692810275c434122199/image/imgFrame.cpp#112
| Reporter | ||
Comment 2•4 months ago
|
||
Transparent pixels would be much better. But if that's hard I would be happy to have black pixels until we get to that.
| Reporter | ||
Comment 3•4 months ago
|
||
Err that was a mistake
| Reporter | ||
Updated•4 months ago
|
| Reporter | ||
Comment 4•4 months ago
|
||
(the question is, is it really easier to detect dark mode from image frame instead of doing transparency unconditionally? 🤔)
| Reporter | ||
Comment 5•4 months ago
|
||
Or we could use gray pixels regardless of the color mode.
Comment 6•4 months ago
•
|
||
This would also not solve cases like bug 1808149 where the website itself is using black type theme even in light mode.
| Reporter | ||
Comment 7•4 months ago
|
||
Gray sounds like the better fallback in that case, and also just easier.
| Reporter | ||
Updated•4 months ago
|
| Reporter | ||
Comment 8•4 months ago
|
||
Well, I tried filling 0x33, but that ended up being glassy gray. Then I tried 0 which made it fully transparent. Huh?
| Reporter | ||
Comment 9•4 months ago
|
||
Updated•4 months ago
|
| Reporter | ||
Comment 10•4 months ago
|
||
Giving up on this, can't do anything other than 0xFF without causing weird issue, as tnikkel said... Let's do bug 1556156 🙂
Description
•