W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2010

[whatwg] Canvas element image scaling

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 28 Dec 2010 07:53:41 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1012280738400.26618@ps20323.dreamhostps.com>
On Sat, 18 Sep 2010, Rob Evans wrote:
>
> Has the canvas spec changed the way the drawImage function scales before 
> drawing to canvas?

On Sat, 18 Sep 2010, Tab Atkins Jr. wrote:
> 
> It doesn't specify how the function scales at all: "Note: This 
> specification does not define the algorithm to use when scaling the 
> image, if necessary.".

Indeed.


On Sun, 19 Sep 2010, Rob Evans wrote:
> 
> Thanks for the reply. I'm already using high resolution images and I 
> cannot cut sections of the image off because I am not using canvas to 
> create thumbnails, I'm using it to create a game engine. I guess this is 
> a question I will have to take up with the Firefox and Chrome developers 
> directly, unless there are any devs here that know why I'm seeing a 
> dramatic difference in scaling quality?

This sounds like a quality-of-implementation issue.


On Fri, 24 Sep 2010, Ruben Rodriguez II wrote:
>
> 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.

It's on the list of things to look at in future versions. In the meantime, 
browsers are experimenting in this area.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 27 December 2010 23:53:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:02 UTC