Skip to content

Instantly share code, notes, and snippets.

@twinge
Created April 27, 2010 23:28
Show Gist options
  • Select an option

  • Save twinge/381489 to your computer and use it in GitHub Desktop.

Select an option

Save twinge/381489 to your computer and use it in GitHub Desktop.
var img = $(this);
var canvasImg = document.createElement("canvas");
canvasImg.setAttribute("id", 'cx'+img.attr('data-picid'));
canvasImg.setAttribute("title", '');
drawImageOnCanvas(img.attr('src'), canvasImg);
img.parent().append(canvasImg);
var canvasImg2 = document.createElement("canvas");
canvasImg2.setAttribute("id", 'cxs'+img.attr('data-picid'));
canvasImg2.setAttribute("title", '');
drawImageOnCanvas(canvasImg.toDataURL(), canvasImg2);
img.parent().append(canvasImg2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment