Skip to content

Instantly share code, notes, and snippets.

@Jagathishrex
Last active April 22, 2020 02:19
Show Gist options
  • Select an option

  • Save Jagathishrex/98d5a6cf25f015e5f07ba04950d2a255 to your computer and use it in GitHub Desktop.

Select an option

Save Jagathishrex/98d5a6cf25f015e5f07ba04950d2a255 to your computer and use it in GitHub Desktop.
let image = new Image();
image.onload = () => {
let canvas = document.createElement('canvas');
canvas.widht = width;
canvas.height = height;
let context = canvas.getContext('2d');
// draw image in canvas starting left-0 , top - 0
context.drawImage(image, 0, 0, width, height );
// downloadImage(canvas); need to implement
};
image.src = blobURL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment