mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
if force 16:9 ratio is not forced, try taking 4:3
This commit is contained in:
@ -324,7 +324,7 @@ public class Preview extends ViewGroup
|
|||||||
Collections.sort(sizes, new SizesComparator());
|
Collections.sort(sizes, new SizesComparator());
|
||||||
Camera.Size maxSize = sizes.get(0);
|
Camera.Size maxSize = sizes.get(0);
|
||||||
for (Camera.Size size : sizes) {
|
for (Camera.Size size : sizes) {
|
||||||
final boolean isProperRatio = !mForceAspectRatio || isProperRatio(size);
|
final boolean isProperRatio = isProperRatio(size);
|
||||||
final boolean isProperResolution = isProperResolution(size, maxResolution);
|
final boolean isProperResolution = isProperResolution(size, maxResolution);
|
||||||
if (isProperResolution && isProperRatio) {
|
if (isProperResolution && isProperRatio) {
|
||||||
maxSize = size;
|
maxSize = size;
|
||||||
@ -369,6 +369,7 @@ public class Preview extends ViewGroup
|
|||||||
float wantedRatio = (float) 3 / 4;
|
float wantedRatio = (float) 3 / 4;
|
||||||
if (mForceAspectRatio || mIsVideoMode)
|
if (mForceAspectRatio || mIsVideoMode)
|
||||||
wantedRatio = (float) 9 / 16;
|
wantedRatio = (float) 9 / 16;
|
||||||
|
|
||||||
final float diff = Math.abs(currRatio - wantedRatio);
|
final float diff = Math.abs(currRatio - wantedRatio);
|
||||||
return diff < RATIO_TOLERANCE;
|
return diff < RATIO_TOLERANCE;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<string name="dark_theme">Dark theme</string>
|
<string name="dark_theme">Dark theme</string>
|
||||||
<string name="use_dcim_folder">Store media in the default DCIM folder</string>
|
<string name="use_dcim_folder">Store media in the default DCIM folder</string>
|
||||||
<string name="focus_before_capture">Refocus before capture</string>
|
<string name="focus_before_capture">Refocus before capture</string>
|
||||||
<string name="force_ratio">Force 16:9 ratio</string>
|
<string name="force_ratio">Use 16:9 ratio</string>
|
||||||
<string name="max_photo_size">Photo resolution limit</string>
|
<string name="max_photo_size">Photo resolution limit</string>
|
||||||
<string name="max_video_size">Video resolution limit</string>
|
<string name="max_video_size">Video resolution limit</string>
|
||||||
<string name="no_limit">none</string>
|
<string name="no_limit">none</string>
|
||||||
|
Reference in New Issue
Block a user