Skip to content Skip to sidebar Skip to footer

Canvas Drawimage Draw Zoomed Image

I need to set canvas size using code and than drawImage on this canvas. The problem is drawn image is zoomed. code follows - currentImageDIV = $('#cnv').css({ 'position' : 'relativ

Solution 1:

I found out that if I hard code the width and height of the canvas tag than no zooming is taking place.

Another solution for this is to set the width and height using prop rather than css (e.g. $("#cnv").prop({"width": 800, "height": 600});)


Post a Comment for "Canvas Drawimage Draw Zoomed Image"