Skip to content

Instantly share code, notes, and snippets.

@branch14
Created December 11, 2012 14:15
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save branch14/4258871 to your computer and use it in GitHub Desktop.
Save branch14/4258871 to your computer and use it in GitHub Desktop.
convert json signatures captured by thomasjbradley's signature-pad to an image
# see https://github.com/thomasjbradley/signature-pad for more details
instructions = JSON.load(data).map { |h| "line #{h['mx']},#{h['my']} #{h['lx']},#{h['ly']}" } * ' '
system "convert -size 198x55 xc:transparent -stroke blue -draw '#{instructions}' signature.png"
@branch14
Copy link
Author

branch14 commented Oct 3, 2023

@harshitDispatch Looks like it should be a <input type="file">

@harshitDispatch
Copy link

harshitDispatch commented Oct 3, 2023

@harshitDispatch Looks like it should be a <input type="file">

@branch14 Yeah that worked. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment