I've got a camera app that selects a preview size based on characteristics of my layout (primarily aspect ratio) and then selects a picture size based on other constraints (minimum dimensions). This often results in a picture with a different aspect ratio than the preview.
This is not a problem in itself, but I need to map a rectangle on my preview to an equivalent rectangle on the picture so that I can extract the same area of the final photo that was visible in the preview when the photo was taken.
I understand that having different aspect ratios means that there will be portions of the rectangles that do not overlap, but I'm not working close enough to the edges that this should be an issue.
If it's not possible to know how the preview and photo map directly, is there perhaps a way to determine how they each map to the native camera? If I could programatically detect the native camera aspect ratio I might be able to determine the cropping scheme.