-
-
Save prsanjay/d2583d8e3cfca57afcd263f086b09742 to your computer and use it in GitHub Desktop.
convert json signatures captured by thomasjbradley's signature-pad to an image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment