Hi David,
I'm just looking for a little advice. I will be inserting images into the app and storing them in the Firestore database. I will be allowing the user to either take the photo using their device or select from the device's gallery as per your AB1 sample 'Camera 3'.
In order to speed up the app, I want to limit the size of the stored images. If the saved image is portrait, I want to resize it to a maximum height of 320px and if it is landscape, I want to resize it to a maximum width of 320px before I upload the image.
I was wondering what your suggested method would be for doing this? It looks like the camera control can be used to scale the image if they take the picture but not if they select an existing picture from their device?
Cheers,
Pete
Hello Peter,
It's curious. According to the documentation, the "targetWidth" and "targetHeight" do not mention the "issue" with the "photolibrary". I know the AB documentation mention it, that is, apaprently these options can't work if we use the "photolibrary" option. Well... I just try it right now and apparently the options working as expected. So I can't be sure why the AB help says other thing...
You can try it by yourself, Peter, I just use the "Camera3" sample app too, and just set a "TargetWidth=100", leaving "TargetHeight=-1". And apparently works like expected in both cases: if we made a photo using the camera, or if we choose an image from the "photogallery". Maybe we can resize an image using some JavaScript techniques, however, since you use the Camera control, maybe the referred options are enough.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.