Skip to content

Conversation

@kinimesi
Copy link

@kinimesi kinimesi commented Jul 28, 2017

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);

@mudcube
Copy link
Contributor

mudcube commented Nov 8, 2017

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

mudcube added a commit to PaintServer/canvas2svg that referenced this pull request Nov 8, 2017
@mudcube mudcube mentioned this pull request Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants