Open herfedos opened 8 years ago
+1
+1
A workaround: make an image element and fill it with canvas image and it will work properly
const imageMask = document.createElement('img');
imageMask.classList.add('image-mask');
// Set imageMask width/height to fit current canvas
// Get Canvas then extract a base46 image
imageMask.src = canvas.toDataURL('png');
// Hide canvas and show image mask instead and after taking the screenshot, hide mask and show canvas again
I'm facing the same issue. Whenever I implement any method of context of my canvas than black screen appears. Else its working fine. And I can't move on with the given workaround because my saved image also contains some text which is not part of canvas but is written over canvas. Now those texts are shown over black screen instead of canvas. Is there any possibility to resolve this issue or is there any other better workaround?
Hi , I want to take a screenshot for my app with using canvas to display 2 charts, i use cordova-screenshot to do this and it works except for canvas elements , they didn't appear in the screenshot , instead there is only black. thank you :)