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

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

~Daniel

Received on Tuesday, 23 September 2014 18:32:06 UTC