[whatwg] Supporting scanners on the web

Jonas Sicking jonas at sicking.cc
Fri Sep 27 11:37:08 PDT 2013


On Thu, Sep 26, 2013 at 10:45 PM, Robert O'Callahan
<robert at ocallahan.org> wrote:
> On Fri, Sep 27, 2013 at 5:29 PM, Jonas Sicking <jonas at sicking.cc> wrote:
>>
>> The most requested ability is to resize images to a particular
>> resolution. This is something that can be done using canvas, but not
>> for videos or animated images. And currently you can't do it off the
>> main thread, which is an issue for larger images.
>
> You can actually. You can draw the image to an offscreen <canvas>, scaling
> it, and then call toBlob() on the canvas, which is async. Nothing forces the
> image drawing and scaling part of that process to be sync.

Good point. Still doesn't solve the video or animated image problem though.

Also, does any browser actually do implement asynchronous scaling in
this case? We definitely shouldn't add an API to work around the lack
of another API, but there's also a difference between something
theoretically being possible to implement, and it actually being
doable enough to happen.

/ Jonas



More information about the whatwg mailing list