Closed Bug 298281 Opened 19 years ago Closed 7 months ago

Implement color-interpolation="linearRGB"

Categories

(Core :: SVG, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
relnote-firefox --- 123+
firefox123 --- fixed

People

(Reporter: bugzilla, Assigned: longsonr)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

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
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
Summary: color-interpolation="linearRGB" renders the same as color-interpolation="sRGB" on the linear gradient in the test suite → Implement color-interpolation="linearRGB"
Severity: normal → S3
Severity: S3 → --
Type: defect → enhancement
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1cb2802bb09b
implement color-interpolation: linearRGB for gradients r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43713 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6a3bba37bd22
implement color-interpolation: linearRGB for gradients r=emilio
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1870811

Robert, is that something worth mentioning in our release notes (general or MDN)?

Flags: needinfo?(longsonr)

Release Note Request (optional, but appreciated)
[Why is this notable]:
We now implement linearRGB interpolation for SVG gradients.
[Affects Firefox for Android]:
yes
[Suggested wording]:
We now implement linearRGB interpolation for SVG gradients, as well as the existing sRGB interpolation. You can choose which to use via the color-interpolation property.
[Links (documentation, blog post, etc)]:
http://www.w3.org/Graphics/SVG/Test/20030813/htmlframe/full-painting-render-01-b.html
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/color-interpolation

relnote-firefox: --- → ?
Flags: needinfo?(longsonr)

Note added to 123 nightly release notes in the Web Standards section with a link to MDN, thanks.

The browser compat data should also be updated (actually added) to reflect that change.

Sebastian

Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: