It may not be possible, it would be really perfect for my situation. I use html5 canvas as a slide show, which the user can draw and save on his local machine.
My goal is to store this in our database in some other way.
What I want:
The canvas loads the slide, and then the user can draw it. As soon as they click "Save", it saves the line data in the cell of our database. When the user goes back to see the slide, it displays the original slide with annotations, and then pulls it over.
Using this method, I will not need to store thousands of images for each unique person, and they will have the opportunity to erase past annotations without erasing the original slide.
Here is my download code:
Canvas:
<input type="button" id="savepngbtn" value="Save Slide"> <div id="main"><canvas id="drop1" class="drop" style=" background-repeat:no-repeat;" width="680" height="510"></canvas></div>
Pulling the original image:
var img = new Image(); img.src = 'pdf_images/pdf-save-0.png'; img.onload = function() { oCtx.drawImage(img, 0, 0) }
What I need:
- Save function / save function for rows created as data in a database
- Code for loading data and displaying it on the canvas, as it was created earlier.
I'm not sure that this is possible, but it would be great and cheerful! Thanks!
source share