Re: Camera/Caputre API

On 12/11/2009 16:09, Tran, Dzung D wrote:
> I sent this message earlier, but didn't see it, so sorry if this is a repeat.
>
> We should take a look at Gears Camera API:
>
> http://code.google.com/p/gears/wiki/CameraAPI

Andrei had already posted that link a few months back, which started a 
similar discussion:

http://www.w3.org/mid/708552fb0908070643u68cb0e28odf299557361aa859@mail.gmail.com

Personally, I like the File Upload idea. E.g.:

[[
<input id="cameraInput" type="file" accept="image/*"/>

<script>
var files = document.getElementById('cameraInput');
// returns an instance of Filelist

// let's write the uploaded picture in to a canvas
var image =  files.item[0].getAs("File.IMAGE");
var canvas = document.getElementById("someCanvas");
canvas.getContext('2D').drawImage(0,0,image.width,image.height);
<script>
]]

or something similar which matches the File Upload specification.


Seems to fulfill most use cases. Except the streaming video, I'm afraid ;)

Max.

Received on Friday, 13 November 2009 16:06:36 UTC