W3C home > Mailing lists > Public > www-style@w3.org > September 2014

Re: [css-images] image-rendering: pixelated, scaling up/down?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Sep 2014 12:07:37 -0700
Message-ID: <CAAWBYDCrOw2azteACpvspBFyBjfdRCWSzZXV3AX4P7VOnZWwag@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style list <www-style@w3.org>, Simon Sapin <simon.sapin@exyr.org>
On Tue, Sep 23, 2014 at 11:45 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
> On 09/23/2014 11:31 AM, Daniel Holbert wrote:
>> On 04/02/2013 06:41 AM, Simon Sapin wrote:
>>> The spec for the 'pixelated' value of the 'image-rendering' property has
>>> different text for "When scaling the image up" and "When scaling down".
>>> How is that defined?
>> [...]
>>> * What if one dimension is scaled up and the other down? For example a
>>> 100x100 PNG with `width: 200px; height: 50px`.
>> [...]
>>> Perhaps "When scaling the image up in at least one dimension" is enough.
>>
>> I'm curious about this as well. (Looks like this spec text still makes a
>> binary distinction between "scaling up" vs "scaling down", which doesn't
>> actually cover the space of possibilities, as Simon says above.)
>>
>> Could this be clarified in the spec?
>>
>> For reference, it looks like Blink's implementation does what Simon
>> suggested -- it pixelates when *at least one* dimension is being scaled up:
>> http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/ImageQualityController.cpp?r1=176839&r2=176957&pathrev=176957
>> http://src.chromium.org/viewvc/blink/trunk/Source/core/rendering/RenderHTMLCanvas.cpp?r1=176839&r2=176957&pathrev=176957
>
> Spec quote/link, for reference:
>  # When scaling the image up, [...]
>  # When scaling down, [...]
> http://dev.w3.org/csswg/css-images/#valuedef-pixelated

How... how did I miss this email.

Fixed.

~TJ
Received on Tuesday, 23 September 2014 19:08:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC