I need to save images drawn (from base64 encoding) into a rounded corner canvas. The canvas is defined using:
<canvas id="thumbnailImage" width="86" height="86" style="border:1px solid #d3d3d3;border-radius:10px;">
The image appears as expected (using ctx.drawImage etc...), with rounded corners. Then I obtain the base64 encoding data of the rounded image using
var imageData = $(jImageId)[0].toDataURL("image/jpeg",qly);
Unfortunately, when the image is displayed without a rounded-corner canvas, the corners are still there...
Question: is there a simple way to get the base64 image data, as it appears on the canvas, or do I have to go through the painful pixel clipping ordeal ?
thank you !