[whatwg] Canvas element image scaling

Ian Hickson ian at hixie.ch
Mon Dec 27 23:53:41 PST 2010


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.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list