[whatwg] Canvas element image scaling

Ruben Rodriguez II cha0s at therealcha0s.net
Fri Sep 24 19:04:04 PDT 2010

On 09/24/2010 08:40 PM, Gregg Tavares (wrk) wrote:
> As others have pointed out, canvas scaling algorithm is not specified 
> and is different in each browser.
> http://greggman.com/downloads/examples/canvas-test/test-01/canvas-test-01-results.html
> http://greggman.com/downloads/examples/canvas-test/test-01/canvas-test-01.html
> On Sat, Sep 18, 2010 at 7:51 PM, Rob Evans <rob at mtn-i.com 
> <mailto:rob at mtn-i.com>> wrote:
>     Thanks I'll give that a go in the morning!
>     All the best,
>     Rob
>>     On 19 Sep 2010 03:42, "Boris Zbarsky" <bzbarsky at mit.edu
>>     <mailto:bzbarsky at mit.edu>> wrote:
>>     On 9/18/10 9:57 PM, Rob Evans wrote:
>>     >
>>     > Thanks for the reply. I’m already using high resolution ima...
>>     Gecko will scale canvas images in one of two ways: either using a
>>     nearest-neighbor algorithm or using a more complicated (bilinear,
>>     bicubic, may depend on other details) algorithm which is slower
>>     but usually gives better results.  You can control which is
>>     happening by setting mozImageSmoothingEnabled on the canvas 2d
>>     context (set to false to get nearest-neighbor and set to true to
>>     get the other).
>>     The default value there is true.  Does setting it to false give
>>     you the Chrome 6 behavior, perchance?  I'd be a little surprised
>>     if it does, but worth trying.
>>     -Boris
Forgive me as I have not kept up with all the discussions on this list, 
but have there been any suggestions with regards to NOT using a filter 
for rescaling? That would be ideal for 'old-skool' graphics where 
pixellation is actually desired, not smoothing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100924/869a7cd2/attachment-0002.htm>

More information about the whatwg mailing list