Camera Control (SUPPORT ISSUE?)

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Camera Control (SUPPORT ISSUE?)

Post by atostaine »

How can I set the image size directly? I guess the shipped example tries to figure out the size of the page and figure out the orientation.

I want to set the image size to 1920 x 1080. I manually changed the #CameraControl.SetImageSize to 1920 x 1080 but the captured image is 800x800.

Is there some where else I need to set the control? We are using LANSA Mobile on windows 10 so we have access to the device.

Thanks
Art Tostaine
JamesDuignan
Posts: 85
Joined: Thu Nov 26, 2015 1:43 pm

Re: Camera Control

Post by JamesDuignan »

Hi Art,

I have done the previously.

A few considerations for I found for this are are:

Setting it correctly to landscape or portrait mode, easiest way i have found is just do the height vs width of the web page to determine it.
Secondly make sure you are setting the SetImageSize and SetImageBase64size properties of the widget.

So you should end up with code the looks like:

Code: Select all

If (#SYS_WEB.WebPage.Height > #SYS_WEB.WebPage.Width)

#Camera.SetImageSize Height(1920) Width(1080) Orientation(PORT)
#Camera.SetBase64ImageSize Height(1920) Width(1080) Orientation(PORT)

Else

#Camera.SetImageSize Height(1080) Width(1920) Orientation(LAND)
#Camera.SetBase64ImageSize Height(1080) Width(1920) Orientation(LAND)

Endif
If you want to see a working example of this check out the Accident Assessor sample application, in particular the xAACameraDialog , this Uses megapixels to determine the height and width of the image with an aspect ratio of 3:4, but other than that it is much the same as what you are trying to do.

Regards,
James Duignan
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Camera Control

Post by atostaine »

Thanks James. I have my width set to 1920 and height to 1080, but the pictures are 800 x 600. Our cameras our 1080p.
Art Tostaine
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Camera Control

Post by atostaine »

The windows camera app shows that it can capture at 2.1MP, 1920 x 1080.
camera.png
camera.png (689.01 KiB) Viewed 9109 times
Art Tostaine
JamesDuignan
Posts: 85
Joined: Thu Nov 26, 2015 1:43 pm

Re: Camera Control

Post by JamesDuignan »

Hi Art,

I don't have a camera on my PC to try this out.

But as your values are being ignored it might be worth shooting this off to support.

Regards,

James
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Camera Control

Post by atostaine »

Thanks James I did.
Art Tostaine
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Camera Control (SUPPORT ISSUE?)

Post by atostaine »

Hoping to get some help on this, I submitted a case 00730183
Art Tostaine
Post Reply