- From: František Řezáč <frantisek.rezac@calavera.info>
- Date: Wed, 3 Mar 2010 16:44:26 +0100
Yes, it works. I failed to spot that it's possible to put data url to Image.src, sorry. On Wed, Mar 3, 2010 at 3:33 PM, Philip Taylor <excors+whatwg at gmail.com> wrote: > On Wed, Mar 3, 2010 at 1:08 PM, Franti?ek ?ez?? > <frantisek.rezac at calavera.info> wrote: >> Description >> add overload of (or add similarly called) method "createImageData" to >> interface CanvasRenderingContext2D which would take two arguments: >> - encodedImageBinaryData >> - dataMimeType >> which are rather self explanatory. >> >> Reason >> The reason is to be able to supply output of the future File API >> standard (http://www.w3.org/TR/FileAPI/) into canvas. > > The canvas API already lets you do: > > ?var img = new Image(); > ?img.onload = function() { > ? ?ctx.drawImage(img, 0, 0); > ? ?// do processing on the canvas > ?}; > ?img.src = 'data:image/png;base64,...'; // get this string from > readAsDataURL etc > > Is that sufficient for your use case? > > -- > Philip Taylor > excors at gmail.com > -- Franti?ek ?ez?? Prague, Czech Republic -------------------------------------------------- Mobile - personal: +420776161038 Mobile - work: +420725817361 Email - personal: frantisek.rezac at calavera.info Email - work: frantisek.rezac at profinit.cz Jabber IM (GTalk): frantisek.rezac at calavera.info Skype: calavera.info www: http://calavera.info --------------------------------------------------- Ekonomov? jsou politruci kapitalismu.
Received on Wednesday, 3 March 2010 07:44:26 UTC