Bug 50117 - pixel interpolation error
Summary: pixel interpolation error
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-26 10:22 PST by jay
Modified: 2011-06-28 09:14 PDT (History)
3 users (show)

See Also:


Attachments
screengrab 1 (90.09 KB, image/tiff)
2010-11-26 10:24 PST, jay
no flags Details
screengrab 2 (35.84 KB, image/tiff)
2010-11-26 10:24 PST, jay
no flags Details
screengrab 3 (108.09 KB, image/tiff)
2010-11-26 10:25 PST, jay
no flags Details
screengrab 4 showing opacity (35.90 KB, image/tiff)
2010-11-26 10:26 PST, jay
no flags Details
script to produce banding effect (ie not by design) (1.26 KB, image/svg+xml)
2010-11-26 10:27 PST, jay
no flags Details
uses percentage width and height (1.32 KB, image/svg+xml)
2010-11-26 10:45 PST, jay
no flags Details
Firefox screenshot (115.26 KB, image/png)
2010-11-26 17:49 PST, Alexey Proskuryakov
no flags Details
shows relative merits (59.83 KB, image/tiff)
2010-11-27 00:36 PST, jay
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jay 2010-11-26 10:22:47 PST
somewhere the rendering of pixel level graphics is broken,

banding is readily evident in the attached images
and is limited to Safari-webkit and Chromium, 
not able to be reproduced using Opera nor Mozilla

I have attached a testcase that uses lerp to interpolate colour values,
and produce gradients across 2 dimensions, rather than a simple linear gradient.

I have not been able to identify precise reasons,
however in a broad range of situations,
using a variety of methods,
banding is always present.
Comment 1 jay 2010-11-26 10:24:29 PST
Created attachment 74946 [details]
screengrab 1
Comment 2 jay 2010-11-26 10:24:53 PST
Created attachment 74947 [details]
screengrab 2
Comment 3 jay 2010-11-26 10:25:26 PST
Created attachment 74948 [details]
screengrab 3
Comment 4 jay 2010-11-26 10:26:03 PST
Created attachment 74949 [details]
screengrab 4 showing opacity
Comment 5 jay 2010-11-26 10:27:42 PST
Created attachment 74950 [details]
script to produce banding effect (ie not by design)
Comment 6 jay 2010-11-26 10:31:36 PST
apologies,

need to qualify testcase better.
Comment 7 jay 2010-11-26 10:45:42 PST
Created attachment 74951 [details]
uses percentage width and height
Comment 8 jay 2010-11-26 10:48:40 PST
it is not that Opera and Mozilla cannot be made to produce banding,
rather it is far more difficult.

In the particular use-case, not given as large file, 
I have not yet found a way to reduce banding,
which is not present at all in other browsers
Comment 9 Alexey Proskuryakov 2010-11-26 17:49:24 PST
Created attachment 74957 [details]
Firefox screenshot

FWIW, I'm seeing the same in Firefox 3.6 on Mac.
Comment 10 jay 2010-11-27 00:36:55 PST
Created attachment 74959 [details]
shows relative merits
Comment 11 jay 2010-11-27 00:41:02 PST
ap,

please compare safarti, mozilla and opera in similar size windows etc.

I have attached an example, not contrived,just as quickly as possible.

full screen height then shifted left to overlay.

there is a considerable difference.

could raise issue with working group?

obviously no client should interpolate white lines, where data has been provided.

on the other hand there is a 'speed' issue, as interpolation takes cycles.
Comment 12 Dirk Schulze 2010-11-27 01:18:52 PST
(In reply to comment #11)
> ap,
> 
> please compare safarti, mozilla and opera in similar size windows etc.
> 
> I have attached an example, not contrived,just as quickly as possible.
> 
> full screen height then shifted left to overlay.
> 
> there is a considerable difference.
> 
> could raise issue with working group?
> 
> obviously no client should interpolate white lines, where data has been provided.
> 
> on the other hand there is a 'speed' issue, as interpolation takes cycles.

Can you check with webkit trunk please? I can confirm a visual difference between Safari 5 and FF as well as Opera. But it seems to work in trunk. Just download a WebKit nightly.
Comment 13 jay 2010-11-27 01:46:59 PST
Dirk,

using r72487
Comment 14 jay 2010-11-27 01:47:36 PST
Version 5.0.3 (6533.19.4, r72487)
Comment 15 jay 2010-11-27 02:14:27 PST
filed as errata: define pixel interpolation when scaling
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11417