Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ozcan-durak/dd6845e21ee0cfdd49917e2ff49b5cc9 to your computer and use it in GitHub Desktop.
Save ozcan-durak/dd6845e21ee0cfdd49917e2ff49b5cc9 to your computer and use it in GitHub Desktop.
Appscreens Generate image without watermarks
//This script has been written for test purposes within couple mins.
//Change this according to your canvas. Grab this from inspect element!
var can = document.querySelector('canvas.canvas-outline.ng-tns-c340-20.lower-canvas');
//Resize the image for IOS 6.5" screens.
var resizedCanvas = document.createElement("canvas");
var resizedContext = resizedCanvas.getContext("2d");
resizedCanvas.height = "2688";
resizedCanvas.width = "1242";
//To resize the image
resizedContext.drawImage(can, 0, 0, 1242, 2688);
var myResizedData = resizedCanvas.toDataURL();
console.log(myResizedData); //This will give you a base64 image output.
//use this website to generate & download * https://codebeautify.org/base64-to-image-converter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment