Jump to content


Photo

Help Converting JSON back to an image


  • Please log in to reply
2 replies to this topic

#1 simeonC

simeonC

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 12 July 2013 - 04:34 PM

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://thomasjbradle...ad/#options-ref

but I cannot seem to get it done

 

Any help would be appreciated Thank you.



#2 kicken

kicken

    Wiser? Not exactly.

  • Gurus
  • 2,568 posts
  • LocationBonita, FL

Posted 12 July 2013 - 10:46 PM

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); ?>;

Recycle your old CD's, don't trash them!
Did I help you out?  Feeling generous? I accept tips via Paypal or Bitcoin @ 14mDxaob8Jgdg52scDbvf3uaeR61tB2yC7

#3 simeonC

simeonC

    Advanced Member

  • Members
  • PipPipPip
  • 46 posts

Posted 13 July 2013 - 08:06 AM

Well I would love to mark this as answer however I did try all of these and the signature has yet to be displayed.. If anyone can experiment with this and see if you can get it to show let me know.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com