tsayen / dom-to-image

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

Download with Jpeg not working #425

Open Dun-sin opened 1 year ago

Dun-sin commented 1 year ago

Use case: description, code

Downloading a dom with Jpeg not working properly, works properly on firefox but not on the other major browsers

Link to live site

outputNode.style.background =url(${imageSRC}) center no-repeat; outputNode.style.backgroundSize = 'var(--output-width)'; outputNode.style.backgroundClip = 'text'; outputNode.style.webkitBackgroundClip = 'text'; outputNode.style.webkitTextFillColor = 'rgba(255, 255, 255, 0.1)';

Expected behavior

Meant to download this: image

Actual behavior (stack traces, console logs etc)

but downloads with just the text but not the background in it pic-text

Library version

^2.6.0

Browsers

cloud-prg commented 1 year ago

i meet the same case

Jeffreyon commented 1 year ago

How far @Dun-sin, did you find a way to solve this problem? I'm trying to generate an image from a DOM node and I'm meeting this error Screenshot 2023-01-07 013122

Did you find another package to use too?

Dun-sin commented 1 year ago

How far @Dun-sin, did you find a way to solve this problem? I'm trying to generate an image from a DOM node and I'm meeting this error Screenshot 2023-01-07 013122

Did you find another package to use too?

So I ended up using this, but it had the same issue, but someone just gave a fix for it in this issue, I think they are similar libraries