ExampleEdit
solve captchca TEMP
by Craig Martin
HTML
<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas -->
<table>
<tbody><tr>
<td><div id="cimg1"><img width="35" height="55" src="http://dhmoney.club/images/capchs/1.png"></div></td>
<td><div id="cimg2"><img width="35" height="55" src="http://dhmoney.club/images/capchs/5.png"></div></td>
<td><div id="cimg3"><img width="35" height="55" src="http://dhmoney.club/images/capchs/2.png"></div></td>
<td><div id="cimg4"><img width="35" height="55" src="http://dhmoney.club/images/capchs/6.png"></div></td>
<td><div id="cimg5"> </div></td>
</tr>
</tbody></table>
<canvas id="canvas" style="border:2px solid black;" width="200" height="200">
</canvas>
JavaScript
// Converts image to canvas; returns new canvas element
function convertImageToCanvas(image) {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
canvas.getContext("2d").drawImage(image, 0, 0);
return canvas;
}
jQuery(jQuery('img').attr('src')).each(function()){
convertImageToCanvas(image)
});
//