[whatwg] Offscreen canvas (or canvas for web workers).

On Sat, Mar 13, 2010 at 12:09 PM, Oliver Hunt <oliver at apple.com> wrote:
>
> On Mar 13, 2010, at 9:10 AM, Jonas Sicking wrote:
>> There is a use case, which I suspect is quite common, for using
>> <canvas> to manipulate files on the users file system. For example
>> when creating a photo uploader which does client side scaling before
>> uploading the images, or for creating a web based GIMP like
>> application.
>>
>> In this case we'll start out with a File object that needs to be read
>> in to a <canvas>. One solution could be to read the File into memory
>> in a ByteArray (or similar) and add a synchronous
>> canvas2dcontext.fromByteArray function. This has the advantage of
>> being more generic, but the downside of forcing both the encoded and
>> decoded image to be read into memory.
>
> Honestly i think ?nice and consistent way for this work work would simply be to support
> someImage.src = someFileObject
>
> Which would be asynchronous, and support all the image formats the browser already supports.

That is already possible:

someImage.src = someFileObject.urn;

However this brings us back to the very long list of steps I listed
earlier in this thread.

/ Jonas

Received on Saturday, 13 March 2010 12:30:23 UTC