If I understand well, I have to select the preview size wrt the aspect ratio of the image to display ?
I have adapted the log to write the aspect ratio of pictures and of supported previews and this gives interesting results with some picture sizes not supported as preview and some preview size not fitting any picture size ...
I really do not clearly understand how to manage those preview sizes ? Maybe restricting a priori the picture sizes to what is supported in preview ?
back_camera_90
Picture sizes________
640x480 1.3333333333333333
960x720 1.3333333333333333
1024x768 1.3333333333333333
1280x720 1.7777777777777777
1600x1200 1.3333333333333333
2560x1920 1.3333333333333333
3264x2448 1.3333333333333333
2048x1536 1.3333333333333333
3264x1836 1.7777777777777777
2048x1152 1.7777777777777777
3264x2176 1.5 <<<<<<<<<<<<<<<<<<< NOT SUPPORTED in preview?
Preview sizes________
960x720 1.3333333333333333
1280x720 1.7777777777777777
640x480 1.3333333333333333
352x288 1.2222222222222223 <<<<<<<<<< NOT FITTING any picture siize
320x240 1.3333333333333333
front camera
Picture sizes________
1280x960 1.3333333333333333
1392x1392 1
640x480 1.3333333333333333
1280x720 1.7777777777777777
720x480 1.5 <<<<<<<<<<<<<<<<<<<< NOT SUPPORTED in preview
320x240 1.3333333333333333
Preview sizes________
960x720 1.3333333333333333
1280x720 1.7777777777777777
704x704 1
352x288 1.2222222222222223 <<<<<<<<<< NOT FITTING any picture siize
640x480 1.3333333333333333
320x320 1
320x240 1.3333333333333333