W3C home > Mailing lists > Public > www-style@w3.org > December 2010

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

From: David Singer <singer@apple.com>
Date: Fri, 3 Dec 2010 08:51:19 -0800
Cc: robert@ocallahan.org, "Tab Atkins Jr." <jackalmage@gmail.com>, James Robinson <jamesr@google.com>, www-style list <www-style@w3.org>, public-fx@w3.org
Message-Id: <2B628268-11CB-44A2-B505-95B6C2C1BB7B@apple.com>
To: Gregg Tavares (wrk) <gman@google.com>

On Dec 2, 2010, at 18:52 , Gregg Tavares (wrk) wrote:

> 
> 
> On Thu, Dec 2, 2010 at 6:34 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Fri, Dec 3, 2010 at 3:13 PM, Gregg Tavares (wrk) <gman@google.com> wrote:
> On Thu, Dec 2, 2010 at 5:59 PM, Robert O'Callahan <robert@ocallahan.org> wrote:
> On Thu, Dec 2, 2010 at 3:04 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Gimme a name for the new value and I'll add it to Image Values.
>  
> I think sometimes authors explicitly want nearest-neighbour (e.g. to expose the pixel data of an image, perhaps in an editor), so we might want to provide 'nearest-neighbor' explicitly.
> 
> For what James described as "optimize-contrast", maybe "optimize-contrast" is the best name. Or maybe "preserve-contrast".
> 
> I agree. I don't understand "optimize-contrast"
> 
> Does that mean If I have 5 pixels black,red,blue,green,white and I scale to 10 pixels I'll get
> 
> black,black,red,redish-purple,bluish-purple,blue,blueish-green,green,white,white since by some definitions there is no contrast between red,green,blue so those would be blended
> 
> Why not just say "nearest-neighbor" if that's the effect people are asking for?
> 
> For some use-cases, e.g. emulators, we want to allow scaling algorithms more elaborate than nearest-neighbor, like the ones Tab linked to earlier.
> 
> I understand that but suspect the user or the developer would want to choose the algorithm, not leave it up to the browser. If the browser chooses the wrong one the results will not be pleasant. Different algos work better with different content. The UA has no way of knowing which is best for a given piece of content or page.

I think the best is if the author classifies the kind of image it is, rather than asking for some special kind of treatment.  We have 'photographic'-like images, aka 'sampled', and we have um, other kinds, like screen shots or images of text etc., with, well, sharp edges that should stay sharp.  Can we find names for these?

>  
> 
> But one option is to tell those authors to implement their own scaling algorithms in WebGL.
> 
> Rob 
> -- 
> "Now the Bereans were of more noble character than the Thessalonians, for they received the message with great eagerness and examined the Scriptures every day to see if what Paul said was true." [Acts 17:11]
> 

David Singer
Multimedia and Software Standards, Apple Inc.
Received on Friday, 3 December 2010 16:51:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT