Created
June 28, 2021 10:06
-
-
Save ozcan-durak/dd6845e21ee0cfdd49917e2ff49b5cc9 to your computer and use it in GitHub Desktop.
Revisions
-
ozcan-durak created this gist
Jun 28, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ //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