Jump to content

Help Converting JSON back to an image


simeonC

Recommended Posts

I have some JSON data that I retrieved from my database which is suppose to represent customers signatures. However I can now capture it but I cannot display it back on to the canvas field because i do not know how..

Is there anyone out there that know how to accomplish this task in the  most simpliest way..

I am currently reading

document from -- since it is his program

http://thomasjbradley.ca/lab/signature-pad/#options-ref

but I cannot seem to get it done

 

Any help would be appreciated Thank you.

Link to comment
https://forums.phpfreaks.com/topic/280107-help-converting-json-back-to-an-image/
Share on other sites

There is an example right there on the page you linked:

$('.sigPad').signaturePad({displayOnly:true}).regenerate(sig);
Where sig is the JSON data from your database. Have PHP echo out your JSON to a sig variable and then use the line above.

 

var sig = <?php echo json_encode($jsonFromDb); ?>;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.