Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set image 'opacity' attribute in drawImage method #53

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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.

None yet

3 participants