W3C home > Mailing lists > Public > www-style@w3.org > February 2016

[css3-images] A value for image-rendering to request high-quality rendering

From: Amelia Bellamy-Royds <amelia.bellamy.royds@gmail.com>
Date: Tue, 2 Feb 2016 18:57:25 -0700
Message-ID: <CAFDDJ7wAMOsZGqqFqCtd7M8pawnr-NYOBomLZVoZx62yGvvZ1Q@mail.gmail.com>
To: Simon Fraser <smfr@me.com>, "www-style@w3.org list" <www-style@w3.org>
Simon asked that the "optimizeQuality" option (from SVG) be re-introduced
for image-rendering.  The current draft spec makes it a deprecated synonym
for "auto", and which is defined to mean scale the image with
interpolation.  The problem Simon found is that some browsers' auto
behavior doesn't always optimize high-quality color interpolation by
default.

The spec already has an issue[1] suggesting that "auto" be reserved for
"default browser behavior" and that "smooth" should be used to specifically
request color interpolation.

A reasonable compromise is therefore to use "smooth" for high-quality color
interpolation (regardless of performance impact) and make "optimizeQuality"
a deprecated synonym for "smooth" instead of "auto".

Keeping "optimizeQuality" instead of introducing "smooth" is an option, but
comes back to the original problem with the SVG syntax: "quality" scaling
is subjective, and smooth interpolation is only quality scaling for
photographic or gradient-filled images.  Also, "smooth" is shorter and
doesn't require camel-casing for readability.

I'll be sending a second email about how the image-rendering approach could
be used to request the browser adjust their normal gradient rendering.
This will specifically require that "smooth" and "auto" are different
options, since many browsers' default gradient renderings are not very
smooth.

~Amelia Bellamy-Royds

[1]: https://drafts.csswg.org/css-images-3/#issue-3fc5518c
Received on Wednesday, 3 February 2016 01:57:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:36 UTC