Last active
August 20, 2016 04:55
-
-
Save rosswaycaster/ab48e462b94774004c5f2ba36a1d4c46 to your computer and use it in GitHub Desktop.
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
var resizedCanvas = document.createElement("canvas"); | |
var resizedContext = resizedCanvas.getContext("2d"); | |
resizedCanvas.width = "1080"; | |
resizedCanvas.height = "1920"; | |
var canvas = $('canvas')[0]; | |
var context = canvas.getContext("2d"); | |
resizedContext.drawImage(canvas, 0, 0, resizedCanvas.width, resizedCanvas.height); | |
var myResizedData = resizedCanvas.toDataURL(); | |
var fb = firebase.database().ref().child('filter').push({ | |
image: myResizedData | |
}); | |
window._pjscMeta.scriptOutput = { | |
test: 'test' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment