Open Bug 298281 Opened 15 years ago Updated 2 years ago

Implement color-interpolation="linearRGB"

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

People

(Reporter: bugzilla, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050531 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050531 Firefox/1.0+

color-interpolation="linearRGB" renders the same as color-interpolation="sRGB"
on the linear gradient in the test suite.

Reproducible: Always

Steps to Reproduce:
1. Visit
http://www.w3.org/Graphics/SVG/Test/20030813/htmlframe/full-painting-render-01-b.html
with Deer Park Alpha 1.1
2. Compare the three gradients.
3. The differences are described in the text on the page. 

Actual Results:  
The three examples look the same.

Expected Results:  
The third example should be different (read the text in the test).
Assignee: nobody → general
Component: General → SVG
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Spec. link: http://www.w3.org/TR/SVG/painting.html#ColorInterpolationProperties
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Unfortunately, cairo does not support multiple color spaces, so at this point,
we're pretty much stuck with what we've got, unless I'm missing something.  When
cairo does provide the support, we can provide the SVG support.
converting sRGB to linearRGB is a simple gamma correction, it can be expressed
as an svg filter ( which allready works in mozilla ! yay :-) ):

<filter id="toLinearRGB" filterUnits="objectBoundingBox" x="0" y="0" width="1"
height="1">
  <feComponentTransfer color-interpolation-filters="sRGB">
     <feFuncR type="gamma" amplitude="1" exponent="0.416666666666" offset="0"/>
     <feFuncG type="gamma" amplitude="1" exponent="0.416666666666" offset="0"/>
     <feFuncB type="gamma" amplitude="1" exponent="0.416666666666" offset="0"/>
     <feFuncA type="gamma" amplitude="1" exponent="0.416666666666" offset="0"/>
  </feComponentTransfer>
</filter>

here is the site where i found this information:
http://www.sjbrown.co.uk/index.php?article=gamma

this can be used as a workaround if you need linearRGB. 
oops, this is not 100% correct, it should be exponent="0.454545454545" , sorry !
Flags: wanted1.9.2+
Assignee: general → nobody
QA Contact: ian → general
Blocks: svg11tests
Duplicate of this bug: 620009
Summary: color-interpolation="linearRGB" renders the same as color-interpolation="sRGB" on the linear gradient in the test suite → Implement color-interpolation="linearRGB"
Not sure what the procedure is to mark a CSS feature in MDN as "not implemented yet", so I'm dropping a note here that this feature should be marked in MDN as "not implemented yet" :)

(Personally, I find this feature very interesting for producing very natural-looking colour blending, possibly with a view to HDR colour in the browser. In conjunction with bloom/blur/spread/convolution filters, very lush appearances can be achieved.)
(In reply to Martin Funcich from comment #6)
> Not sure what the procedure is to mark a CSS feature in MDN as "not
> implemented yet", so I'm dropping a note here that this feature should be
> marked in MDN as "not implemented yet" :)
> 
> (Personally, I find this feature very interesting for producing very
> natural-looking colour blending, possibly with a view to HDR colour in the
> browser. In conjunction with bloom/blur/spread/convolution filters, very
> lush appearances can be achieved.)

Oooh, just noticed there is a color-interpolation-filters property for SVG filters that defaults to linearRGB and appears to be already working ... nice ...
(In reply to Martin Funcich from comment #6)
> Not sure what the procedure is to mark a CSS feature in MDN as "not
> implemented yet", so I'm dropping a note here that this feature should be
> marked in MDN as "not implemented yet" :)
> 

It is implemented for mask elements though, but not elsewhere.
You need to log in before you can comment on or make changes to this bug.