PhantomJS doesn't respect SVG color-interpolation-filters

453 views Asked by At

I have an SVG with two images. These images have feComponentTransfer applied to them.
For these images, color-interpolation-filters is set to linearRGB and sRGB, correspondingly:

http://jsfiddle.net/9eU37/6/

Here's how it renders in Safari and Chrome:

enter image description here

(linearRGB on the left, sRGB on the right)

Here's how PhantomJS renders it:

enter image description here

(linearRGB on the left, sRGB on the right)

As you can see, PhantomJS seems to ignore color-interpolation-filters (there is no difference between the two images). Another odd thing is that the resulting image matches neither sRGB nor linearRGB browser version.

Is there anything I can do it make it render SVG like the browser does, and respect the setting?

1

There are 1 answers

1
Michael Mullany On BEST ANSWER

You can do your own gamma correction manually by using an feComponentTransfer type=gamma. Usually a 2.2 for the exponent will do it.