canvas2svg icon indicating copy to clipboard operation
canvas2svg copied to clipboard

Set image 'opacity' attribute in drawImage method

Open kinimesi opened this issue 7 years ago • 1 comments

Set opacity attribute of images. Right now, the opacity is always 1 in converted SVG files, try the following:

ctx.globalAlpha = 0.5;
var img = new Image();
img.src = "https://www.w3schools.com/tags/img_the_scream.jpg"

ctx.drawImage(img, 0, 0);

kinimesi avatar Jul 28 '17 17:07 kinimesi

This pull request works. @webspinner Any chance of getting this merged in? Thanks!

mudcube avatar Nov 08 '17 23:11 mudcube