Mobile SDK View Container Dynamic Width and Height

Hi,

Using mobile SDK how to dynamically change the container width and height based on camera stream.

I know where to set these values but looking for an option to get that information from camera and then set the container W x H accordingly.

Currently I have cameras with image rotates on different degree (0,90,180) i.e. portrait and landscape view, and using fixed width and height stretched the image.

Regards,

Afzal

Hi Afzal,

It is a little bit strange that your image is stretches as the Mobile server preserves the original picture aspect ratio when is doing the rescaling.

For example if camera original image is set to 800 x 600 px and you request video stream which to fits into the container 400 x 400 px, you will receive rescaled image with resolution 400 x 300.

Probably something is not set correctly in the container in order to not stretch the image.

That could be easily checked if you download and save one image as a file with extension .jpg.

Anyway there is information in the video stream for the actual image resolution after the rescale.

Please specify you platform (JS, Android, iOS, .NET) and we will guide you where to look at it. It will be best if you specify and sample, where you started from.