Skip to content

Commit e8897f5

Browse files
committed
[css-images] Add 'image-rendering: high-quality' value, per WG resolution.
1 parent 5c462da commit e8897f5

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

css-images/Overview.bs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,6 +1861,30 @@ Determing How To Scale an Image: the 'image-rendering' property {#the-image-rend
18611861
such as bilinear interpolation.
18621862
This is intended for images such as photos.
18631863

1864+
<dt><dfn>high-quality</dfn>
1865+
<dd>
1866+
Identical to ''image-rendering/auto'',
1867+
but with a preference for higher-quality scaling.
1868+
If system resources are constrained,
1869+
images with ''high-quality'' should be prioritized over those with ''auto'',
1870+
when considering which images to degrade the quality of
1871+
and to what degree.
1872+
1873+
<div class=note>
1874+
This value <em>does not</em> prevent the image quality from being degraded
1875+
when the system resources are constrained.
1876+
It merely expresses a preference that these images should receive extra scaling resources
1877+
relative to the ''image-rendering/auto'' images.
1878+
If all images on the page have ''high-quality'' applied,
1879+
it's equivalent to all of them having ''image-rendering/auto'' applied--
1880+
they're all treated the same.
1881+
1882+
To get the most value out of ''high-quality'',
1883+
only apply it to the most important images on the page.
1884+
</div>
1885+
1886+
Issue: The name of this value is currently being discussed.
1887+
18641888
<dt><dfn>crisp-edges</dfn>
18651889
<dd>
18661890
The image must be scaled with an algorithm that preserves contrast and edges in the image,
@@ -1873,9 +1897,9 @@ Determing How To Scale an Image: the 'image-rendering' property {#the-image-rend
18731897
to preserve a "pixelated" look as the image changes in size.
18741898
</dl>
18751899

1876-
Issue: Should we move the current ''auto'' behavior to a well-named keyword (''smooth''?)
1877-
and just define ''auto'' to be "whatever the UA wants",
1878-
which is what ''auto'' usually means?
1900+
Issue: Should we move the current ''image-rendering/auto'' behavior to a well-named keyword (''smooth''?)
1901+
and just define ''image-rendering/auto'' to be "whatever the UA wants",
1902+
which is what ''image-rendering/auto'' usually means?
18791903

18801904
This property does not dictate any particular scaling algorithm to be used.
18811905
For example, with ''image-rendering: auto'',

0 commit comments

Comments
 (0)