Dom-to-image: Can I get a transparent image?

Created on 22 Feb 2018  ·  4Comments  ·  Source: tsayen/dom-to-image

Is it possible to generate image that has transparent background?

Most helpful comment

Hi @anesin1109 ,

yes that's possible. To demonstrate this, I created three nodes: One contained a transparent image, the two others contain red text (one of them have a explicit transparent background). Then I used dom-to-image and loaded the created images in front of another image:
screenshot-2018-2-24 transparent-dom-to-image

You can run this example yourself:

yarn install
yarn start

The website will be available under localhost:8080.
transparent-dom-to-image.zip

All 4 comments

Hi @anesin1109 ,

yes that's possible. To demonstrate this, I created three nodes: One contained a transparent image, the two others contain red text (one of them have a explicit transparent background). Then I used dom-to-image and loaded the created images in front of another image:
screenshot-2018-2-24 transparent-dom-to-image

You can run this example yourself:

yarn install
yarn start

The website will be available under localhost:8080.
transparent-dom-to-image.zip

Hi,
can you close this issue or do you need any further help/examples? :)

Oh, I'm sorry. I forgot to close the issue. It's my first issue that can be closed while using Github for 5+ years lol

No problem, I'm just glad that I could help you :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhpSriptKiddie picture PhpSriptKiddie  ·  4Comments

da1z picture da1z  ·  6Comments

shahebaz444 picture shahebaz444  ·  5Comments

cnatis picture cnatis  ·  8Comments

yangqin007 picture yangqin007  ·  3Comments