>
>   let blob = new Blob([buf], {'type': imageType});
>>   document.getElementById('targetImg').src = URL.createObjectURL(blob);
>> } 
>>
>
> I see.  In your case, targetImg is an <img>, right?  Do you know how I 
> could use this same technique with a <canvas>? 
>
>
If the <img> was off-screen or hidden, couldn't you still reference it to 
get the data into the canvas like:
  var img = document.getElementById('targetImg');
  ctx.drawImage(img, 10, 10);

Might not be the most efficient way, but it seems like it should work.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8dbab1d3-fc01-471c-9dbd-b0132b613c5f%40googlegroups.com.

Reply via email to