SergioGarcia Posted May 21, 2021 Share Posted May 21, 2021 Hello, I have a problem with TUnimCanvas, I use for a customer signature , when I save to an image (jpeg,gif,png,etc...), allways save with background black(see image attached), The Unigui Demo Canvas movileTouch also does the same. I have tried to save the image with savetostream and savetofile. My version of UniGui is 1.90.0.1541 Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2021 Share Posted May 21, 2021 Hello, Confirmed. Link to comment Share on other sites More sharing options...
likemike Posted May 21, 2021 Share Posted May 21, 2021 I use SaveToFile for the same reason (customer signature) without problems (version 1.90.0.1549). Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2021 Share Posted May 21, 2021 7 minutes ago, likemike said: I use SaveToFile for the same reason (customer signature) without problems (version 1.90.0.1549). 2 hours ago, SergioGarcia said: The Unigui Demo Canvas movileTouch also does the same. Can you please test? Link to comment Share on other sites More sharing options...
likemike Posted May 21, 2021 Share Posted May 21, 2021 Here is a little tipp for those you want to save a file to a directory outside the main-directory af the app. PROCEDURE TForm.UniCanvas1AfterSubmit(Sender:TObject); VAR TempName:STRING; BEGIN TempName:=UniServerModule.LocalCachePath+'Test.jpg'; UniCanvas1.SaveToFile(TempName, tiJPG); // first save it to the local-path CopyFile(PChar(TempName), PChar(<your desired path>), FALSE); // then copy the file to where you want END; This is necessary, because the client has no direct access to the outside-directory. Link to comment Share on other sites More sharing options...
likemike Posted May 21, 2021 Share Posted May 21, 2021 28 minutes ago, Sherzod said: Can you please test? Strange... with the demo I get the same result (whole picture is black). But with my app it works perfect - and there is nothing special. Link to comment Share on other sites More sharing options...
SergioGarcia Posted May 21, 2021 Author Share Posted May 21, 2021 Only in Canvas Movile TUNIMCANVAS in TUniCanvas work fine. I Attach a simple Project with a mobile Canvas and a button to save. Project1F.rar Link to comment Share on other sites More sharing options...
asapltda Posted May 21, 2021 Share Posted May 21, 2021 Good morning, I'm also registering the signature on a cell phone, but I want to know if the document actually has the signature, and I haven't been able to do it. Does anyone know how to check if a signature exists? Link to comment Share on other sites More sharing options...
likemike Posted May 21, 2021 Share Posted May 21, 2021 I've tested it. It works in a seperate form but not in Mainform. I've added a new form to the demo-project (click on "Try this!") . With that, the picture is saved correctly. CanvasDemo-Testcase.rar Link to comment Share on other sites More sharing options...
SergioGarcia Posted May 21, 2021 Author Share Posted May 21, 2021 Not work, same problem. Link to comment Share on other sites More sharing options...
SergioGarcia Posted May 21, 2021 Author Share Posted May 21, 2021 Sorry, yes work but I do not understand i save the image i another place than AfterSubmit or not work? Link to comment Share on other sites More sharing options...
likemike Posted May 21, 2021 Share Posted May 21, 2021 7 minutes ago, SergioGarcia said: Sorry, yes work but I do not understand i save the image i another place than AfterSubmit or not work? Sorry, but I don't understand your question. Link to comment Share on other sites More sharing options...
SergioGarcia Posted May 21, 2021 Author Share Posted May 21, 2021 Sorry, your example save 3 times image and now save again in black. I have no idea why it happens Link to comment Share on other sites More sharing options...
SergioGarcia Posted May 21, 2021 Author Share Posted May 21, 2021 Hi, I have found the problem, the first time it saves the image in black and then save well Link to comment Share on other sites More sharing options...
Recommended Posts