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
Hello,
I'm using exportImage('png') to export the drawing, and pass the data to my server via an ajax call to save the file for later viewing. <button onClick={() => { canvasRef.current .exportImage("png") .then((data) => { saveDrawing(somedata1, somedata2, data); }) .catch((e) => { console.log(e); }); }} > Save Drawing </button>
I want to re-import the image back into the canvas, but i cant seem to find a way.
I can do this with a basic html canvas
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
-
Hello,
I'm using exportImage('png') to export the drawing, and pass the data to my server via an ajax call to save the file for later viewing.
<button onClick={() => { canvasRef.current .exportImage("png") .then((data) => { saveDrawing(somedata1, somedata2, data); }) .catch((e) => { console.log(e); }); }} > Save Drawing </button>
I want to re-import the image back into the canvas, but i cant seem to find a way.
I can do this with a basic html canvas
` const canvas = document.getElementById('drawingCanvas');
const context = canvas.getContext('2d');
How can i achieve this using this component?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions