General
Save signature image to file from HTML
Please note that you cannot create a file from HTML in a web browser because of the rules of safe scripting.
Solutions are as follows:
STU SDK
From Github download the STU SigCaptX demobuttons sample
In demobuttons.html search for the function generateImage() which illustrates how to save a signature to a canvas.
Once the signature is on a canvas it can then be extracted in JPEG or PNG format using toDataURL.
You can then create a Base64 encoded string representing the image which can be submitted to the server and converted to an image file.
Signature SDK
See CaptureImage.js in the Signature SDK Samples - Jscript folder on Github.
Alternatively with the SigCaptX cross-browser you can use RenderBitmap to create a Base64 string representing the image file - see the function onRenderBitmap() in SigCaptX-Capture.html in the SigCaptX samples on Github. This can be submitted to the server where it can be converted to a file.