Skip to main content

api.mobile.camera.takePicture() resolution

LPPapillon-1145
Original Poster

We use this API to take pictures from the drive app. When we send them out, the resolution and very low. Is there any way to control it? Can we get the original picture in full resolution?

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

Hi LP,

 

I'm thinking the answer is 'probably not'. If Drive is used to TAKE the picture then all that really exists is likely the 500x500 PNG ultimately created from the associated UploadMediaFile call.

 

That appears to always be true, even if instead of taking the picture the "Upload" image is used. Such an image is still cropped to a maximum dimension of 500 pixels, then reduced to fit that size as a PNG, then sent as Base64 encoded data. I've not gone digging in the code for it, but I'd suspect that this is to minimize data consumption required for transmission from a mobile device.

 

For better quality pictures for the defects, the solution might be to have the defect pictures as is, with an original resolution picture provided by the driver alternately/separately as needed when more detailed resolution is required.

 

Thanks,

Ken

2 Replies

Hi LP,

 

I'm thinking the answer is 'probably not'. If Drive is used to TAKE the picture then all that really exists is likely the 500x500 PNG ultimately created from the associated UploadMediaFile call.

 

That appears to always be true, even if instead of taking the picture the "Upload" image is used. Such an image is still cropped to a maximum dimension of 500 pixels, then reduced to fit that size as a PNG, then sent as Base64 encoded data. I've not gone digging in the code for it, but I'd suspect that this is to minimize data consumption required for transmission from a mobile device.

 

For better quality pictures for the defects, the solution might be to have the defect pictures as is, with an original resolution picture provided by the driver alternately/separately as needed when more detailed resolution is required.

 

Thanks,

Ken

LPPapillon-1145
Original Poster

Thanks, that's what I figured, but was hoping otherwise. We used to circumvent this perfectly in the Drive app version 5, input type="file" would open up the camera roll or camera app and we could manage the files directly. Now, this broke with the Drive app version 6 release, and Geotab provided api.mobile.camera.takePicture() as an alternative. This means we are stuck with 500x500 pictures in crappy resolution and no other way to access the camera or camera roll. Document scanning is impossible.

Still have questions?