Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't have a very good solution but I would suggest not handling an invisible canvas through the dom by setting it invisible.</p> <p>Instead of</p> <pre><code> var canvas = document.getElementById('canvas'); </code></pre> <p>Try </p> <pre><code>var canvas = document.createElement('canvas'); canvas.width = video.width; canvas.height = video.height; canvas.getContext('2d').drawImage(video, 0, 0) </code></pre> <p>This way it's separate from the DOM.</p> <p>Also Why not use </p> <pre><code>canvas.toDataURL("image/jpg")? </code></pre> <p>EDIT: Also, if you're designing it, have you tried the other browsers out there? Whats restricting you to Opera over the other browsers available or using phonegap?</p> <p>EDIT2: Thinking about it, Canvas also has two other options for getting that photo into place that you would want to look in two. Those two being:</p> <pre><code>var imgData = canvas.getContext('2d').getImageData(0,0,canvas.width,canvas.height); </code></pre> <p>-or-</p> <pre><code>canvas.getContext('2d').putImageData(imgData,0,0); </code></pre> <p>These two ignore any scaling you've done to the context but I've found that they are much more direct and often faster. They are a solid alternative to toDataURL and drawImage but the image data you put and get from these are encoded as an array in the form:</p> <p>[r1, b1, g1, a1, r2, b2, g2, a2....]</p> <p>you can find documentation for them here:</p> <p><a href="http://www.w3schools.com/tags/canvas_putimagedata.asp" rel="nofollow">http://www.w3schools.com/tags/canvas_putimagedata.asp</a> <a href="http://www.w3schools.com/tags/canvas_getimagedata.asp" rel="nofollow">http://www.w3schools.com/tags/canvas_getimagedata.asp</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload