Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

FMXSignatureCapture android producing blank images

 Post Reply Post Reply
Author
Ridge Rhonda View Drop Down
New Member
New Member
Avatar

Joined: 18 Jul 2012
Posts: 4
Post Options Post Options   Quote Ridge Rhonda Quote  Post ReplyReply Direct Link To This Post Topic: FMXSignatureCapture android producing blank images
    Posted: 12 Nov 2019 at 3:07pm
Hi, we've emailed TMS support but have as of yet not got a reply so we're reaching out to the community.

We're using the FMXSignatureCapture in an app and producing .sig and .png files from it. This works fine on iOS and Windows but on Android the .png file produced is valid but blank, the .sig file is ok.

We have tried producing .bmp instead but that errors. We have tried producing .jpg but that also produces a blank file.

This is the code we are using:
        fname := TGuid.NewGuid.ToString;
{$IF Defined(ANDROID) or Defined(IOS)}
        localPathFilename := TPath.Combine(TPath.GetDocumentsPath, 'images' + PathDelim + fname + '.png');
        localSigFilePathFilename := TPath.Combine(TPath.GetDocumentsPath, 'images' + PathDelim + fname + '.sig');
{$ELSE}
        localPathFilename := TPath.Combine(ExtractFileDir(ParamStr(0)), 'images' + PathDelim + fname + '.png');
        localSigFilePathFilename := TPath.Combine(ExtractFileDir(ParamStr(0)), 'images' + PathDelim + fname + '.sig');
{$ENDIF}
       SignatureCapture.SaveToImageFile(localPathFilename);
       SignatureCapture.SaveToFile(localSigFilePathFilename);

To replicate add a FMXSignatureComponent, sign and run the above code.

Thanks



Back to Top
Ridge Rhonda View Drop Down
New Member
New Member
Avatar

Joined: 18 Jul 2012
Posts: 4
Post Options Post Options   Quote Ridge Rhonda Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2019 at 3:43pm
I can create an FMX app to generate the images post process, but how do i resize my signature component to match the .sig file? If I don't I'll end up with some of the signature missing...

Thanks
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3405
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2019 at 10:27pm
Hi,

Have you tried saving it to a different folder? For example the TPath.GetSharedDocumentsPath?
Alternatively, try loading the signature image inside a TImage after saving it to see what happens?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down