W3C home > Mailing lists > Public > www-style@w3.org > April 2017

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

From: Lea Verou <lea@verou.me>
Date: Wed, 19 Apr 2017 15:15:56 +0900
Cc: Simon Sapin <simon.sapin@exyr.org>
To: www-style list <www-style@w3.org>
Message-Id: <DA0A6927-C5A5-47F3-9C03-DA1561AF6A33@verou.me>
> Hi,
> 
> 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?
> 
> First, should this only apply to raster images, like 'image-resolution'?
> 
> Assuming that, I think the distinction of scaling up or down should be 
> based on the ratio of image pixels per device pixels, regardless of 
> anything measured in CSS units.
> 
> Some cases are more tricky:
> 
> * What if one dimension is scaled up and the other down? For example a 
> 100x100 PNG with `width: 200px; height: 50px`.
> 
> * What if the overall transform is not axis-aligned? For example a 
> rotation angle that is not a multiple of 90 degrees.
> 
> 
> Perhaps "When scaling the image up in at least one dimension" is enough.
> 
> -- 
> Simon Sapin


Hi Simon,

It looks like there is no mention of "scaling up" or "scaling down" in the prose anymore. Instead the text now reads "The image must be scaled with the "nearest neighbor" or similar algorithm, to preserve a "pixelated" look as the image changes in size".

Do you feel your issue has been resolved?

Cheers,
Lea

Lea Verou ✿ http://lea.verou.me ✿ @leaverou











Received on Wednesday, 19 April 2017 06:16:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:07 UTC