This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6327 - filters-comptran-01-b reference PNG incorrect
Summary: filters-comptran-01-b reference PNG incorrect
Status: NEW
Alias: None
Product: SVG
Classification: Unclassified
Component: Filter Effects (show other bugs)
Version: All Specifications
Hardware: PC Windows NT
: P2 normal
Target Milestone: Test Suite
Assignee: Doug Schepers
QA Contact: SVG Public List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-20 16:46 UTC by Jasper
Modified: 2010-10-18 17:16 UTC (History)
1 user (show)

See Also:


Attachments
SVG file that demonstrates how filters-comptrans SHOULD render (except for the gamma gradient, which is not as easy to mimic) (4.61 KB, image/svg+xml)
2008-12-20 16:48 UTC, Jasper
Details

Description Jasper 2008-12-20 16:46:42 UTC
Attached is a file which demonstrates how the first three gradients should render (if I read the SVG standard correctly) by simply substituting the filtered gradients by gradients which mimic the filtering. I have no idea in what way, exactly, the current reference PNG is wrong, but it most definitely seems to be very wrong:
 - The first third of the "table" gradient should be a transition from yellow to black, without any green. This can be easily verified by considering that in the original gradient went from #ff0000 to #00ff00 and that the two transfer functions are mirror versions of each other.
 - At the far left of the "linear" gradient the red channel in the reference PNG reaches values above 200, while 255*(.5+.25)=191.25.
 - At x=133, the original gradient (at the top) has green value 207, the "gamma" gradient should therefore have value 255*(2*(207/255)^3+0)=272.8... (so 255, as the values are clamped). In contrast, the reference PNG has value 185.
Comment 1 Jasper 2008-12-20 16:48:43 UTC
Created attachment 612 [details]
SVG file that demonstrates how filters-comptrans SHOULD render (except for the gamma gradient, which is not as easy to mimic)
Comment 2 Jasper 2009-01-06 13:15:58 UTC
I just found out about the color-interpolation properties, which means the calculations become a lot more complicated (and it's not as easy to calculate a correct reference). So, the original reference MIGHT be correct after all.
Comment 3 Dirk Schulze 2010-10-18 17:16:40 UTC
(In reply to comment #2)
> I just found out about the color-interpolation properties, which means the
> calculations become a lot more complicated (and it's not as easy to calculate a
> correct reference). So, the original reference MIGHT be correct after all.

Thats correct. The 'color-interpolation-filters' property is set to 'linearRGB' by default. Thats why your expected result looks different to the one on the test suite. You get your result, if you set 'color-interpolation-filters' to 'sRGB'. At least on viewers with support for this property.
I think this bug can be closed.