tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.23k stars 1.68k forks source link

CSS image masks not working #297

Open corey01 opened 5 years ago

corey01 commented 5 years ago

Hi,

The library works great for me, unless there is a CSS image mask on something within the HTML. If there is, this element is completely skipped by the renderer.

I've looked into the code and can see the mask is still present at the copy stage.

Is there any advice for how to get this to work?

Thanks!

ctf0 commented 4 years ago

u had any luck with this yet ?

alexmarles commented 3 years ago

I am also having issues with the elements that have mask properties. Any idea on how to make it work?

ctf0 commented 3 years ago

@tsayen any input on this ?

istoan commented 2 years ago

2022 here and CSS mask image still doesn't work. Anyone found a fix for this?

marcomanenti22 commented 2 years ago

Nothing again unfortunately...

PimikaMeaw commented 1 year ago

Still nothing :/

marcomanenti22 commented 1 year ago

I don't know if i solved in right way but here my working mods:

I hope they will be useful to someone ; )

dom-to-image.js.txt (rename leave .txt obviusly)

alexmarles commented 1 year ago

Hey @marcomanenti22 avoid pasting links for people to download unknown files. This could be considered as a security thread, and you have plenty of options to show pieces of code in GitHub. You can put it in a code block inside a comment like this:

(function() {
    // blablabla

Or you can also upload the Javascript file as a Gist and then share it here.

Ultimately, if it's a proposal for a solution, you can always fork the repository, do the changes and create a Pull Request, so the maintainers can review and add your code to the repository.

Hope it helps!

PimikaMeaw commented 1 year ago

It's working, thank you so much ! It's still not capturing the border-image though, but I'll try a few ways I found. Thanks again for sharing!! :)