Saving Canvas to Internal Storage

Rename the fileName to "myImage1.jpg" and try again without testing with Companion beforehand.

Thanks Anke, this works !

Btw, ...

grafik

also used in my refresh_Anke.aia, so as @Taifun said...

Indeed. :wink:

hello sir, i'm creating a geocam app, and im having trouble saving it, when i tried your .aia sample it works. but when i started to change things, im not getting the result i want. this is what i did but afterpicture image wont show on canvas backgroundimage, when i save it, it do save as plain white. also sir, i cant figure out where to set DefaultFileScope=Legacy, its not on the properties panel of screen on Designer page.

You will find the FileScope setting in Project Properties on the main screen:

1 Like

See also here:

1 Like

thank you sir!

thank you sir! i made progress with both of your help..
i'm having an issue with my project sir.


after taking picture, the image capture doesnt show up at canvas. but saving the blank canvas is working and showing up at gallery.

i tried to change filescope to app again and the captured image do show in canvas, but saving in gallery is not working again. and drawtext to canvas is not working as well

DefaultFileScope = Legacy doesn't work on Android 11+ with the Camera component, because the Camera.AfterPicture path is not a Shared folder and therefore the app does not have access to it.

So set DefaultFileScope = Shared and try again.

1 Like

thank you so much sir, it do save in the gallery and shows up in canvas. but my drawtext dont appear on the saved image, and it saves 2 images. is it possible to just save the drawn image ?

my x and y are off the canvas sir.. im fixing it already

is location sensor not working in companion mode? do i need to build an apk to make it work sir?

1 Like

sir, relPath is procedure ? can i also see its block ? thank you so much for assisting

grafik

1 Like


sir this is what i currently have, im not getting the image in canvas after taking picture and saving 2 images, one is blank white and the other is the image i captured.

Post the aia or send it to me via PM.

1 Like

1 Like

im still getting 2 images saved with this block sir.

Remove the Image.Picture block.

1 Like

with different timestamps
You are saving the canvas 3 times...what about saving the canvas and refeeshing the gallery only once? Then use the path to the file and display it as image, in the label and as background image

Taifun

1 Like

with this it's still saving 2 images. i dont understand the logic behind this. i thought that with this block it will only save the final canvas with drawtext.

Each time you use the Canvas.SaveAs method you save the canvas

Save it only once and to display the background inage use the path to the image from Label1.Text

Taifun

1 Like