Serkant KARACA wrote:
> Quotes from http://www.w3.org/TR/2003/PR-PNG-20030520/
> I think it would be appropriate to warn implementors about the
> undesirable consequences of focusing only on PNG colors when the the
> PNG image is presented in some larger graphical context such as a
> HTML+CSS page or an SVG graphic. Inconsistent color within such an
> aggregate document looks worse than the colors of the entirety being
> slightly off but consistently.
You're absolutely correct. Oddly enough, that wasn't blindingly obvious
at the time...
>> When the incoming image has unknown gamma (gAMA, sRGB, and iCCP all
>> absent), choose a likely default gamma value, but allow the user to
>> select a new one if the result proves too dark or too light. The
>> default gamma may depend on other knowledge about the image, for
>> example whether it came from the Internet or from the local system.
> Instead of recommending guessing a "likely value", I think it would be
> better to recommend that decoding applications that also handle other
> color sources (eg. GIF, JFIF, CSS) treat the color values of unlabeled
> PNGs consistently with other other unlabeled color sources. That is, it
> would be desirable for a given RGB value to be presented as the same
> color in a Web browser regardless of the RGB values source (CSS,
> unlabeled JFIF, GIF, unlabeled PNG) in order to be able to mix various
> color sources in a design.
> The original PNG specification emphasized doing *something* with gamma
> over making PNG images look good as components of a larger web page
> design. As a result, some browsers (eg. Safari, older versions of Opera
> and some really old Mac builds of Mozilla) treat PNG colors
> inconsistently compared to all other color sources reducing the
> usefulness of PNG images as components of larger designs.
And that has become a serious issue in the years since the spec was
written. Unfortunately, modifying the spec is an extremely slow process,
primarily due to ISO/IEC procedures, and it can be done only on 5-year
intervals, I believe. (Note that the current version of the spec was
basically ready close to two years before it actually got published;
final editorial tweaks, national voting, and interminable publishing
delays dragged on...interminably. ;-) )
Instead, I've concentrated on building test pages where gamma and color
consistency can be directly verified, and I've recently started adding
the corresponding browser screenshots (IE 7.0b1 was the lucky pioneer).
Jason Summers has a test page with yet another twist on the subject
(combining alpha blending with gamma correction). The next step is to
feed back the results to the various browser-makers and, in the case
of the open-source ones, perhaps even supply patches. But all of this
requires time, so it doesn't necessarily happen very quickly, either.