- From: Tingan Ho <tingan@p1.cn>
- Date: Mon, 9 Dec 2013 22:49:50 +0100
- To: Oliver Hunt <oliver@apple.com>
- Cc: What WG WG <whatwg@lists.whatwg.org>, Jeff Muizelaar <jmuizelaar@mozilla.com>, Glenn Maynard <glenn@zewt.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Rik Cabanier <cabanier@gmail.com>
> > I’m not sure why you have a bias towards bicubic filtering as there are > many different scaling filters that can be used. > Lanczos is better than bicubic in many (most?) cases. Spline scaling > can also do a good job, as can fractal interpolation. That would be even better. At least if I can opt-in for the one I want. But I think most developers also don't want to dive into this algorithms, so it would be good to have default values that perform well. right now I don't know exactly what all browser vendors are using, maybe bilinear? But it result in very poor image quality. I think it also breaks consistency that drawImage doesn't behave the same way as you would scale up and down an ordinary HTML Image object. On Mon, Dec 9, 2013 at 10:15 PM, Oliver Hunt <oliver@apple.com> wrote: > > On Dec 9, 2013, at 2:29 PM, Tingan Ho <tingan@p1.cn> wrote: > > >> > >> Tingan, would it be acceptable for you to do the resampling in > JavaScript? > > > > > > First, writing it in Javascript is less performant. Since natively you > can > > have access to the GPU. Second, it is abstract a layer for JS developers, > > since they don't need to care about bicubic resampling algoritmen. Third, > > it kind of make sense if you set imageSmothingEnabled to true in the > > context object, that all down-scaling should use bicubic resampling(I > > haven't tried yet, but I think the scale use bicubic sampling). > > I’m not sure why you have a bias towards bicubic filtering as there are > many different scaling filters that can be used. > > Lanczos is better than bicubic in many (most?) cases. Spline scaling > can also do a good job, as can fractal interpolation. > > There are even specific scaling systems like Sal which are designed for > upscaling sprites, and do a better job at the specific task than anything > else (IIRC this is frequently used by the various old console emulators) > > —Oliver > > -- Sincerely, Tingan Ho tingan@p1.cn
Received on Monday, 9 December 2013 21:50:17 UTC