Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
brr_blog_script0
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
You can’t perform that action at this time.