Re: [whatwg] Bicubic filtering on context.drawImage

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:
http://people.mozilla.org/~jmuizelaar/image-scaling/scale.html

-Jeff

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