W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: [css3-images] image-rendering property for contrast-preserving image upscaling

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sun, 6 Feb 2011 21:16:14 -0800
Message-ID: <AANLkTi=wHj6kcCgTUf5FhwHtubGAJNX3fpdy6Yg6O6S5@mail.gmail.com>
To: Lech <unattended@gmail.com>
Cc: www-style@w3.org
On Sat, Feb 5, 2011 at 8:37 AM, Lech <unattended@gmail.com> wrote:
> Sorry for resurrecting a topic like this, but if it's not yet set in
> stone I may have a constructive solution for this:
> As many authors are indeed asking for 'nearest-neighbor' scaling
> explicitly for pixel art/editors and anything which requires pixel
> precision at zoom. Instead of abstracting away the name of the given
> method for image scaling or filtering, why not allow authors the
> option to specify the method value explicitly as suggested? To add
> what Robert was suggesting, calling the as it's named, for example
> "image-rendering: nearest-neighbor;" as a minimum, explicitly named
> base requirement and leaving it up to vendors (collectively) to also
> make available any other scaling or filter methods which are available
> (Bilinear seems wide-spread) to the authors along with any new methods
> that come along in the future (Bicubic/Lanczos/Other) to use as they
> please.
> Bilinear and Bicubic scaling are becoming fairly common now that I
> suspect in the it will be uncommon not to find these filtering and
> scaling methods available in the future. I'd also wager that most
> authors asking for these values explicitly will know what to expect
> based on what they're asking for.
> Currently I read "auto | optimizeSpeed | optimizeQuality | inherit" as
> the values under
> http://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty, adding
> another value to specify the scaling or filtering method explicitly
> would help in many ways by giving options to over-ride the UA. I
> suspect that optimizeSpeed and Quality are targeted toward mobile
> devices which are slowly gaining on desktop systems so I can guess
> that if and by the time this becomes final AND fully supported across
> the board it may already be out-dated.
> In any case, having these options would certainly be a bonus. My two cents,

I don't believe there's a good reason to specify an explicit
algorithm.  When you know precisely what algorithm you want, you can
implement that yourself easily in canvas.  When you don't care all
that much (which should be the common case), you can just declare your
intent and let the browser do what it wants to make everything look as
good as possible.

Received on Monday, 7 February 2011 05:17:07 UTC

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