I am using the Camera control and uploading the Stream property to a SQL VARCHARMAX column. It seems that the resolution is controlled by the size of the camera control? Is this true, if so can I change it? I don't want a big control but I don't want tiny useless image?
I think the camera control gives images at 640 x 480 resolution regardless of the size of the control on the screen.
The resulting images are about 0.5Mb in size.
You can use the Add Picture control instead, but then you have to select a previously taken photo from the devices photo gallery.
I built an app to test this. I created 4 screens with each having a different size picture. The sizes were 10x10, 100x100, 500x500 and 750x750 (biggest I can fit on the canvas). I then uploaded to SQL VARCHAR field. I added a column in SQL that is simply a LEN of the other column. I also noted Camera control size when Patching in photo. First 8 are two runs of Camera.Stream and the last 4 are Camera.Photo just in case it operates differently.
This is on an iPad (6th Gen, IOS 12.1) I am going to test again on a Surface Pro just in case as well. It appears the photo size is completely controlled by the camera object size. This is both curious and maybe frustrating.
Ok this appears to be device, camera and maybe app player dependent. I tested again on iPad using back camera and the size / scaling was consistent with front camera. I then tested on Surface Pro using Edge browser player and the photo size was static no matter what however it was different if I used front or back camera. For some reason I can't get Windows Store App to download right now on my Surface so I will try that next. Anyone have an Android device they can test this on? It seems the camera control function is highly device / player dependent. Will also try chrome in case that makes a difference.
Hi @BrianHFASPS - very interesting results.
Using Chrome and the front camera of an HP EliteBook, I get a 640x480 image regardless of camera control size.
On Android I'm also getting a 640x480 image (the camera is something like 12 megapixels) - I haven't tried varying the control size yet but will test that later.
The file sizes vary a bit from image to image (about 400Kb to 550Kb), but my assumption is that is due to image compression.
In my tests I'm pushing the images to a SharePoint list (as text) and then using a Flow to convert to a binary image and save to a SharePoint library (where I can see the file size).
Unfortunately I don't have an iOS device to test with at present.
I'm turning the data into a binary file, then just checking the file properties for the resolution.
I'm using Flow to create a file in a SharePoint library where the content is the data from the camera property converted to binary using dataUriToBinary function.
I have a video on how to do that here: https://www.youtube.com/edit?ar=2&o=U&video_id=P6xMLprDTjU
I did it with Windows Store App rather than via web browser on Surface Pro and got variable sizes based upon size of camera control. On android are you using web broswer or app from Play Store? Also can you try store app on your EliteBook?
Easy way to check the resolution of the photo. Add an image control and get it to display the photo.
Set the CalculateOriginalDimensions of the image to true.
Add a label and set text property as follows: imgPhoto.OriginalWidth & "x" & imgPhoto.OriginalHeight
Where imgPhoto is the name of your image control.