question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return the ImageData from the Canvas context

See original GitHub issue

The WebcamImage object should contain the ImageDate from the canvas’ context. So it would be easier to perform pixel-level manipulation on the captured image.

Sample: https://www.w3schools.com/tags/canvas_getimagedata.asp

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
davidshen84commented, Nov 1, 2018

https://davidshen84.github.io/#/webcam

Here’s a simple application that makes use of this change.

The layout doesn’t work well on a small screen.

0reactions
davidshen84commented, Dec 8, 2018

Hi @basst314 ,

Instead of adding a module level configuration, I decided to add a captureImageData attribute to the component. It’s a boolean type value and the default value is false. This makes sure the component is backward compatible, and the developers have instance level control of this object.

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CanvasRenderingContext2D.getImageData() - Web APIs | MDN
The CanvasRenderingContext2D method getImageData() of the Canvas 2D API returns an ImageData object representing the underlying pixel data ...
Read more >
HTML canvas getImageData() Method
The getImageData() method returns an ImageData object that copies the pixel data for the specified rectangle on a canvas. Note: The ImageData object...
Read more >
HTML5 Canvas Image Data Tutorial
To get the image data for each pixel of a rectangular area on the canvas, we can get the image data object with...
Read more >
HTML | canvas getImageData() Method
The getImageData() method is used to copy the pixel data for the specified rectangle on a canvas. There are 4 pieces of information...
Read more >
possible to use html images like canvas with getImageData ...
height = h; canvas.width = w; var ctx = canvas.getContext('2d'); // 2) Copy your image data into the canvas ctx.drawImage( myImgElement, 0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found