return a black screen when convert canvas to image
See original GitHub issuePlatform: Android
Expected behavior
screenshot of canvas
Actual behavior
return a black screen
In my render() method
<ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9, result: "base64" }}>
<View collapsable={false}>
<Canvas ref={this.mycanvas} style={{ width: deviceWidth, height: canvasHeight }} crossOrigin="Anonymous"
/>
</View>
</ViewShot>
method to capture
this.refs.viewShot.capture().then(uri => {
console.log("do something with ", uri);
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Why does my canvas go blank after converting to image?
I am trying to convert the canvas element on this page to a png using the following snippet (e.g. enter in JavaScript console):...
Read more >toDataURL png gets a black background · Issue #282 - GitHub
Using jpeg, the canvas.toDataURL method returns a black image ( known bug in the library I'm using to convert a svg to a...
Read more >How to resolve Canvas.todataurl() which returns a black ...
Hi,. You can use toDataURL to convert canvas to image. function convertCanvasToImage(canvas) {.
Read more >Manipulating video using canvas - Web APIs | MDN
This tutorial demonstrates how to perform chroma-keying (also known as the "green screen effect") using JavaScript code. The document content. The HTML document ......
Read more >Canvas - Android Developers
Save the canvas state, draw the picture, and restore the canvas state. ... Returns the maximum allowed height for bitmaps drawn with this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
repalce your format jpg to png or any other and it’s done
@dean9703111 found a solution