Base64 extension help

..... are you really that scary? :joy:

Yes, you can do that, the camera extension will remove the old surface and initialize the whole thing with a new one.

1 Like

Can't relate :joy:

.... I see TakeCameraImageToBase64 maxImgLength - that's quite a variable across different devices, who would know? Is there an input, e.g. "-1" that means 'no max'. By the way, a Label can take a really huge string (whole book!). I'm not displaying it though, it is passed to a javascript.

off-topic, but:

Do you mean Tim ai2s extension?

There is a block to take just that without a limit.

The idea is (IIRC) to make the image fit the screen widthways regardless of landscape/portrait/image size....

...wasted on me because the image is never displayed in the App. Typical mid-range smartphone image size is large, mine churns out 2736 x 3648 photos. However, it's best not to modify the image size (or anything) if you need the Exif data.

So that leads to another question - if the length has to be input, how does the extension produce the photo to suit that dimension? If it scales the photo after it is taken, the Exif data will most likely be lost.

It is a little bit confusing because the Blocks refer to image, picture and photo. really should be just Photo.

If not using the built-in TakeCameraImageToBase64 Block, the SavedPhoto Block should offer the full path of the photo, for further processes such as reading the exif data and forwarding the photo.

All my blocks refer to image

If you use the TakePreviewImageToBase64 block then this is not resized, but it is a MUCH smaller "image"...

A very nice feature but not of use for this App.

At the moment, in Companion, App runs but is 'stuck' in camera view mode and as an APK, crashes on launch. However, we don't want to view either, just take photos programmatically at regular intervals without the User needing to control the shots.

So here are my Blocks, which may be of use if only to see why they don't work. I think I have to stick with Taifun's Camera extension as it can take shots purely programmatically.

Of course not, because:

Can you show how it should be done Anke?

Actually:

I'm still missing something, Companion crashes immediately. APK also crashes immediately.

to find out more use logcat

Taifun

Yup - unfortunately logcat has always failed to work on my Huawei P30 Pro.

You may need to remove the file:// from your full path

Also you will need to ask for CAMERA permission

Did you read the tool tip for MakeDirectory, the block returns true not the directory

Got that in my Blocks image........

Didn't know that - will try. Meanwhile, getting a result with Juan's camera function but only in Companion, running APK permission CAMERA is revoked :roll_eyes: