Created
June 28, 2021 10:06
-
-
Save ozcan-durak/dd6845e21ee0cfdd49917e2ff49b5cc9 to your computer and use it in GitHub Desktop.
Appscreens Generate image without watermarks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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