Open
Bug 821450
Opened 13 years ago
Updated 3 years ago
Add dithering support for opaque images
Categories
(Core :: Graphics: ImageLib, defect, P5)
Tracking
()
People
(Reporter: jrmuizel, Unassigned)
References
Details
(Whiteboard: [tech-p2])
Attachments
(3 files, 1 obsolete file)
5.04 KB,
patch
|
Details | Diff | Splinter Review | |
238.94 KB,
image/png
|
Details | |
49.29 KB,
image/png
|
Details |
This shouldn't be too hard and might be worth doing. There will of course be a performance impact, but might not be too bad if we do during conversion to 16bit surfaces.
Updated•13 years ago
|
blocking-kilimanjaro: --- → ?
Updated•13 years ago
|
tracking-fennec: --- → ?
Comment 1•13 years ago
|
||
Jeff, can you comment as to how much this will help and if we should track it for release?
Flags: needinfo?(jmuizelaar)
Reporter | ||
Comment 2•13 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #1)
> Jeff, can you comment as to how much this will help and if we should track
> it for release?
It's hard to say how much it will help, without specific problems that we want to address. I would suggest not tracking it for release.
Flags: needinfo?(jmuizelaar)
Reporter | ||
Comment 3•13 years ago
|
||
Reporter | ||
Comment 4•13 years ago
|
||
Attachment #702659 -
Attachment is obsolete: true
Comment 5•13 years ago
|
||
qawanted to compare the results from this with the problem images they've identified
Keywords: qawanted
Comment 6•13 years ago
|
||
Pushed this as https://tbpl.mozilla.org/?tree=Try&rev=68560043a297 now to find a few representative images.
We have a really badly banded image in prime real estate in the b2g UI. I'll grab before/after screenshots as soon as I can.
(We're separately working around this with <canvas> for v1.)
I don't see a difference. Maybe we have to stick this somewhere else in the pipeline too?
Reporter | ||
Comment 9•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #8)
> Created attachment 703764 [details]
> left: without, right: with
>
> I don't see a difference. Maybe we have to stick this somewhere else in the
> pipeline too?
The banding on this comes from compositing the gradient mask and the wallpaper together. To fix that, I think we'd need a fully dithered pipeline which is unlikely to be performant enough.
Reporter | ||
Comment 10•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #8)
> Created attachment 703764 [details]
> left: without, right: with
>
> I don't see a difference. Maybe we have to stick this somewhere else in the
> pipeline too?
I was also talking with Patryk and Peter about this particular case and it sounds like we may just solve it by using a solid color dim instead of a gradient mask.
We have a <canvas> hack that gets the job done.
Reporter | ||
Comment 12•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #11)
> We have a <canvas> hack that gets the job done.
That comes at the cost of having to blend the 'opaque' canvas with what is underneath it. Probably not a big a deal, but things like this add up.
Comment 13•13 years ago
|
||
Pushed this as https://tbpl.mozilla.org/?tree=Try&rev=68560043a297 now to find a few representative images.
Updated•13 years ago
|
tracking-fennec: ? → +
QA Contact: kbrosnan
Updated•13 years ago
|
Blocks: b2g-v-next
Important use case for content; content doesn't seem to generally ship dithered resources so they look bad on low-end screens.
Whiteboard: [tech-p2]
Comment 15•12 years ago
|
||
Dropping qawanted since the request was accomplished in comment 8.
Keywords: qawanted
Comment 16•11 years ago
|
||
Would this also fix the rendering of this testcase? The middle column should look like the right one.
Reporter | ||
Comment 17•11 years ago
|
||
(In reply to The 8472 from comment #16)
> Created attachment 8503355 [details]
> gradients.png
>
> Would this also fix the rendering of this testcase? The middle column should
> look like the right one.
What is the test case from?
Comment 18•11 years ago
|
||
I generated it with imagemagick. It's a 16bit PNG with gradients between shades of green.
The first column is with color steps truncated to 8bit precision, the second column with full 16bit precision and the 3rd column with the same 16bit gradient dithered to 8bit.
Assuming an 8bit output device and no dithering the 2nd column will look like the 1st column, i.e. banded
But ideally the 2nd column should look like the 3rd column.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•