I'm working on transparent images with canvas in html5 and I would like to add borders.
The problem is that the property "Stroke" will not take into account the transparency of the image and will apply it as if it were a rect.
Example:
Of course, this image contains transparency.
I can get the result I want with imagemagick:
I only use png images. I want to use the canvas in HTML to perform this operation. I use vue-konva but I can also stay on native canvas if you have solutions to offer to me ...