Re:The SRGB Learning Curve
by vanderZwan on Wednesday December 02, 2015 @07:09AM
(#10662453)
Regarding your last point, that's another reason to hope hardware accelerated path rendering gets adopted ASAP:
https://www.youtube.com/watch?v=yN6eyFYDMkg&t=11m4s
(I know this is not exactly the same visual bug, but generally speaking Mark Kilgard & Co. seem to have done their homework and really implemented the specs properly)
The other reasons being that it's faster and more energy-efficient.
Have you seen this work? http://w3.impa.br/~diego/projects/GanEtAl14/
Re:The SRGB Learning Curve
by vanderZwan on Thursday December 03, 2015 @08:15AM
(#10669368)
Nope, thanks for the link!
As a result of this problem, it’s difficult to judge whether image resizing specifically is being done incorrectly, or whether the image is just being interpreted incorrectly at any size.
You’ll notice if you open your first test image (http://www.4p8.com/eric.brasseur/gamma-1.0-or-2.2.png) in Apple’s Preview app, you get the correct behavior, but this is different from the behavior in Safari, for example, which shows something incorrect at every size. Stranger still, the behavior in Safari is roughly “correct” while resizing a browser window, but as soon as you let go of the mouse, it reverts to being incorrect.
There are multiple possible ways to embed color space info into PNG images, and the PNG spec is actually really terrible and confusing on this subject which results in lots of inconsistencies from one implementation to another. If I remember correctly some of them are treated better by browsers than others, but I’m not sure if there’s a way to encode images such that it will be handled properly everywhere (I mean, handled correctly even at 100% size, without any resizing). I’m not an expert on browser image rendering though. cf. e.g. https://hsivonen.fi/png-gamma/ or for a more general browser color rant cf. http://regex.info/blog/photo-tech/color-spaces-page1
* * *
One particularly annoying thing about gamma and image rendering is that all font and vector graphics rendering in pretty much all software (Illustrator, Inkscape, Cairo, Quartz, browsers, etc.) is implicitly done (incorrectly) in gamma-encoded space rather than linear space. This causes vector graphics with thin lines to change dramatically in appearance as you scale them up or down, but no implementation is able to fix their behavior and do the right thing because all content (e.g. small text rendering) in that renderer will suddenly look “wrong”.