When I capture a photo, I have to specify the dimensions (width and height) in the camera device service. Depending on the orientation of the camera (landscape or portrait), the native camera image may not match the dimensions aspect ratio. For example I can setup a target size of 1024 x 768 (landscape), but if the user takes the photo in portrait mode, then the system adjusts (stretches) the image to the landscape result.
Is there any way to ensure the aspect ratio of the photo is maintained when captured from the camera and stored in the app?