You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to export only what I draw without the background image, but when I place the prop it still exports the background. I have this code: <ReactSketchCanvas ref={canvas} style={false} width={img.naturalWidth} height={img.naturalHeight} strokeWidth={50} strokeColor="black" backgroundImage={initImage} exportWithBackgroundImage={false} />
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to export only what I draw without the background image, but when I place the prop it still exports the background. I have this code:
<ReactSketchCanvas ref={canvas} style={false} width={img.naturalWidth} height={img.naturalHeight} strokeWidth={50} strokeColor="black" backgroundImage={initImage} exportWithBackgroundImage={false} />
function getImage() { canvas.current .exportImage('svg') .then((data) => { console.log(data) }) .catch((e) => { console.log(e) }) }
and the version is:
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-sketch-canvas": "^6.2.0"
Beta Was this translation helpful? Give feedback.
All reactions