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

On Tue, Sep 23, 2014 at 2:54 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> Thanks!  On the same topic -- is there documentation anywhere (or a
> thread on this list) about why there's a required difference in behavior
> between downscaling & upscaling, for this "pixelated" value?
>
> From reading the Blink intent-to-implement thread[1], it sounds like
> part of the reason may be that downscaling with nearest-neighbor doesn't
> actually *look* "pixelated" at all.  This make some sense, but I'm not
> sure it makes sense to me that this reason (on its own) is enough to
> jusify requiring additional logic for "are we upscaling or downscaling"
> for every image-rendering-flavored operation that's influenced by this
> particular style. (and I wouldn't expect authors to be too mystified if
> "image-rendering:pixelated" produced gross, blocky behavior when
> downscaling.)
>
> Were there other reasons as well, or is that mostly it?

Nope, that's it.  The point of the keyword is to capture an intent,
and downscaling with nearest-neighbor doesn't actually do that, so I
had it instead do a higher-quality downscale.

That said, I'm not too concerned about this.  If it's a bother to
track upscaling vs downscaling, I'm fine with just making it
consistent.

~TJ

Received on Tuesday, 23 September 2014 22:26:58 UTC