-
-
Save uploadcare-user/cfb9087c496cc5ba6ab3c1de94e096a5 to your computer and use it in GitHub Desktop.
brr_blog_script0
This file contains 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
function resizeImage(img, width, height) { | |
var canvas = document.createElement('canvas'); | |
canvas.width = width; | |
canvas.height = height; | |
canvas.getContext('2d').drawImage(img, 0, 0, width, height); | |
return canvas; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment