remove RESOLUTION_LIMIT
This commit is contained in:
parent
c1f3ea98d7
commit
1e1031f70a
@ -18,13 +18,6 @@ export const SAFE_AREA_PADDING = {
|
|||||||
// whether to use takeSnapshot() instead of takePhoto() on Android
|
// whether to use takeSnapshot() instead of takePhoto() on Android
|
||||||
export const USE_SNAPSHOT_ON_ANDROID = false;
|
export const USE_SNAPSHOT_ON_ANDROID = false;
|
||||||
|
|
||||||
// The maximum photo resolution (in pixels).
|
|
||||||
// Setting this to a lower value means faster capture speed
|
|
||||||
// Setting this to a higher value means higher quality images
|
|
||||||
export const RESOLUTION_LIMIT = Platform.select({
|
|
||||||
android: 3264 * 1840,
|
|
||||||
});
|
|
||||||
|
|
||||||
// whether to use ultra-wide-angle cameras if available, or explicitly disable them. I think ultra-wide-angle cams don't support 60FPS...
|
// whether to use ultra-wide-angle cameras if available, or explicitly disable them. I think ultra-wide-angle cams don't support 60FPS...
|
||||||
export const USE_ULTRAWIDE_IF_AVAILABLE = true;
|
export const USE_ULTRAWIDE_IF_AVAILABLE = true;
|
||||||
|
|
||||||
|
@ -103,24 +103,10 @@ export const compareFormats = (left: CameraDeviceFormat, right: CameraDeviceForm
|
|||||||
const rightPhotoPixels = right.photoHeight * right.photoWidth;
|
const rightPhotoPixels = right.photoHeight * right.photoWidth;
|
||||||
if (leftPhotoPixels > rightPhotoPixels) {
|
if (leftPhotoPixels > rightPhotoPixels) {
|
||||||
// left has greater photo dimensions
|
// left has greater photo dimensions
|
||||||
const isLeftAbovePixelLimit = RESOLUTION_LIMIT != null && leftPhotoPixels > RESOLUTION_LIMIT;
|
leftPoints += 3;
|
||||||
if (isLeftAbovePixelLimit) {
|
|
||||||
// left exceeds our pixel limit
|
|
||||||
leftPoints -= 3;
|
|
||||||
} else {
|
|
||||||
// left does not exceed our pixel limit
|
|
||||||
leftPoints += 3;
|
|
||||||
}
|
|
||||||
} else if (leftPhotoPixels < rightPhotoPixels) {
|
} else if (leftPhotoPixels < rightPhotoPixels) {
|
||||||
// left has smaller photo dimensions
|
// left has smaller photo dimensions
|
||||||
const isRightAbovePixelLimit = RESOLUTION_LIMIT != null && rightPhotoPixels > RESOLUTION_LIMIT;
|
leftPoints -= 3;
|
||||||
if (isRightAbovePixelLimit) {
|
|
||||||
// right exceeds our pixel limit
|
|
||||||
leftPoints += 3;
|
|
||||||
} else {
|
|
||||||
// right does not exceed our pixel limit
|
|
||||||
leftPoints -= 3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const leftCropped = applyScaledMask(
|
const leftCropped = applyScaledMask(
|
||||||
|
Loading…
Reference in New Issue
Block a user