Android Question How to Save a Signature Capture with only the points of the signature

Discussion in 'Android Questions' started by Lyndon Bermoy, Feb 5, 2015.

  1. Lyndon Bermoy

    Lyndon Bermoy Member Licensed User

  2. DonManfred

    DonManfred Expert Licensed User

    Look at the SignPad Library in similar thread-list...
     
  3. Lyndon Bermoy

    Lyndon Bermoy Member Licensed User

    thanks sir :) but it is the same with having saved as an image. I wanted to store the signature in the database as a points, and will restore with the assigned points in the stored signature. How to do this sir?
     
  4. DonManfred

    DonManfred Expert Licensed User

    But you have an transparent image. Just scan the pixels of this bitmap. Only the pixels from the signature have a color... All others are transparent

    You can easily print this transparent image on an document for example...
     
  5. klaus

    klaus Expert Licensed User

    You could add two lists one for each coordinate and memorize the points in these lists in the Panel_Touch routine in the SignatureCapture module.
     
  6. Reviewnow

    Reviewnow Active Member Licensed User

    it would be best to just base64 encode the image and store the encoded string in your database you could then decode and display it later

    Code:
    'Add StringUtils Library
      
      
    Dim signatureCaptured() As Byte
      signatureCaptured = SignatureCapture.GetAsByteArray2(SD, 
    90"PNG")
      
      
    Dim MyEncodedImage as String
      
      MyEncodedImage = su.EncodeBase64(signatureCaptured)  
    '' Reference String utils
      'Save  MyEncodedImage

    'Add the following code to your signaturecapture class
    Sub GetAsByteArray2(objSignatureData As SignatureData, quality As Int,  format As String ) As Byte()
       
    Dim out As OutputStream
       out.InitializeToBytesArray(
    0)
       objSignatureData.Canvas.Bitmap.WriteToStream(out,quality,format)
       out.Close
       
    Return out.ToBytesArray()
    End Sub
     
    Peter Simpson likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice