I have a canvas tag:
<canvas width="321" height="240" id="img_source"></canvas>
I want to add a crop functionality, so I made a resizeable div that can identify the borders of cropped image through dragging the corners of the div using the mouse. It looks like the image below:
I'm currently using "toDataURL()" to convert the data from the canvass to an image that can be displayed by an <img>
tag. My question is, How will I convert to an image only part of the canvas that was identified by the resizeable div?