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
|
||||
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...
|
||||
export const USE_ULTRAWIDE_IF_AVAILABLE = true;
|
||||
|
||||
|
@ -103,24 +103,10 @@ export const compareFormats = (left: CameraDeviceFormat, right: CameraDeviceForm
|
||||
const rightPhotoPixels = right.photoHeight * right.photoWidth;
|
||||
if (leftPhotoPixels > rightPhotoPixels) {
|
||||
// left has greater photo dimensions
|
||||
const isLeftAbovePixelLimit = RESOLUTION_LIMIT != null && leftPhotoPixels > RESOLUTION_LIMIT;
|
||||
if (isLeftAbovePixelLimit) {
|
||||
// left exceeds our pixel limit
|
||||
leftPoints -= 3;
|
||||
} else {
|
||||
// left does not exceed our pixel limit
|
||||
leftPoints += 3;
|
||||
}
|
||||
leftPoints += 3;
|
||||
} else if (leftPhotoPixels < rightPhotoPixels) {
|
||||
// left has smaller photo dimensions
|
||||
const isRightAbovePixelLimit = RESOLUTION_LIMIT != null && rightPhotoPixels > RESOLUTION_LIMIT;
|
||||
if (isRightAbovePixelLimit) {
|
||||
// right exceeds our pixel limit
|
||||
leftPoints += 3;
|
||||
} else {
|
||||
// right does not exceed our pixel limit
|
||||
leftPoints -= 3;
|
||||
}
|
||||
leftPoints -= 3;
|
||||
}
|
||||
|
||||
const leftCropped = applyScaledMask(
|
||||
|
Loading…
Reference in New Issue
Block a user