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

Re: [whatwg] Bicubic filtering on context.drawImage

From: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date: Mon, 9 Dec 2013 16:03:57 -0500
Message-Id: <39F69E60-EF2D-4942-B36B-8FD45DC515D8@mozilla.com>
To: Tingan Ho <tingan@p1.cn>
Cc: WHATWG <whatwg@lists.whatwg.org>, Glenn Maynard <glenn@zewt.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Rik Cabanier <cabanier@gmail.com>

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 think it
> is is a miss in the specification that the method drawImage doesn't use
> bicubic resampling. It is a method of the context objext on des
> down-scaling.

GPUs donít do bicubic resampling natively. You may also find that javascript can give enough performance to be usable:

Received on Monday, 9 December 2013 21:04:25 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC