Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var canvas = document.getElementById('c');
var ctx = canvas.getContext('2d');
var image = new Image();
image.src = 'data:image/jpg;base64,seu_buffer_transformado_em_base64';
image.onload = function() {
ctx.drawImage(image, 0, 0);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment