mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-21 22:18:32 -04:00
Add default options to capture high quality photos
This commit is contained in:
@@ -68,9 +68,11 @@ const CameraContainer = ( ): Node => {
|
||||
const devices = useCameraDevices( );
|
||||
const device = devices[cameraPosition];
|
||||
const hasFlash = device?.hasFlash;
|
||||
const initialPhotoOptions = hasFlash
|
||||
? { flash: "off" }
|
||||
: { };
|
||||
const initialPhotoOptions = {
|
||||
enableAutoStabilization: true,
|
||||
qualityPrioritization: "quality",
|
||||
...( hasFlash && { flash: "off" } )
|
||||
};
|
||||
const [takePhotoOptions, setTakePhotoOptions] = useState( initialPhotoOptions );
|
||||
const { deviceOrientation } = useDeviceOrientation( );
|
||||
const [showDiscardSheet, setShowDiscardSheet] = useState( false );
|
||||
|
||||
@@ -155,6 +155,8 @@ const CameraView = ( {
|
||||
: null}
|
||||
ref={cameraRef}
|
||||
device={device}
|
||||
preset="photo"
|
||||
enableHighQualityPhotos
|
||||
// Props for ARCamera only
|
||||
frameProcessor={frameProcessor}
|
||||
frameProcessorFps={frameProcessorFps}
|
||||
|
||||
Reference in New Issue
Block a user