react-native-vision-camera/package/example/src
Marc Rousavy 37398cc909
feat: Flash with AE Pre-capture trigger for Android (#2558)
### Flash (`flash`)

Adds `flash` functionality with a fully custom pre-capture AE/AF/AWB trigger sequence for Android. 🎉 

```ts
camera.current.takePhoto({
  flash: 'on' // or 'auto'
})
```

### Better photos (`qualityPrioritization`)

We now also run the AE/AF/AWB precapture sequence on every photo (unless `qualityPrioritization` is `speed`), meaning photos are now less blurry, properly exposed, and properly white-balanced - so in short: **photo quality is now better!**.

The fast path still exists when using `qualityPrioritization: speed`, as that will skip the precapture sequence and metering actions and just grab an Image from the Camera as quickly as possible.

Additionally, `qualityPrioritization` now controls these options:

- [COLOR_CORRECTION_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#COLOR_CORRECTION_MODE)
- [EDGE_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#EDGE_MODE)
- [COLOR_CORRECTION_ABERRATION_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE)
- [HOT_PIXEL_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#HOT_PIXEL_MODE)
- [DISTORTION_CORRECTION_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#DISTORTION_CORRECTION_MODE)
- [NOISE_REDUCTION_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#NOISE_REDUCTION_MODE)
- [SHADING_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#SHADING_MODE)
- [TONEMAP_MODE](https://developer.android.com/reference/android/hardware/camera2/CaptureRequest#TONEMAP_MODE)

..by setting them to `_FAST` or `_HIGH_QUALITY`, which was previously left untouched. 

This now means:
- `takePhoto({ qualityPrioritization: 'speed' })` got FASTER 🚀 
- `takePhoto({ qualityPrioritization: 'quality' })` got BETTER QUALITY 📸 
- `takePhoto({ qualityPrioritization: 'balanced' })` is left unchanged 
2024-02-14 16:43:30 +01:00
..
frame-processors feat: Add zero-copy SharedArray type to Frame Processor Plugins (#2383) 2024-01-12 16:00:36 +01:00
hooks feat: Add "Camera Devices" screen to Example (#1927) 2023-10-05 14:52:03 +02:00
img Add Image to example 2023-09-01 19:52:08 +02:00
views feat: Flash with AE Pre-capture trigger for Android (#2558) 2024-02-14 16:43:30 +01:00
App.tsx perf: Make getCameraPermission and getMicrophonePermission synchronous (#2302) 2023-12-19 14:22:04 +01:00
CameraPage.tsx feat: Implement focus() on Android (#2523) 2024-02-08 15:16:58 +01:00
CodeScannerPage.tsx chore: Enable zoom gesture in CodeScanner page 2023-11-10 13:25:28 +01:00
Constants.ts chore: Simplifies Code Scanner Page (#2145) 2023-11-10 12:08:28 +01:00
DevicesPage.tsx chore: Simplifies Code Scanner Page (#2145) 2023-11-10 12:08:28 +01:00
MediaPage.tsx fix: Fix photo not saving in example app on Android 13+ (#2522) 2024-02-07 11:51:24 +01:00
PermissionsPage.tsx chore: Remove semicolons (#1846) 2023-09-26 11:39:17 +02:00
Routes.ts feat: Implement cornerPoints and frame for scanned codes (#2117) 2023-11-09 11:57:05 +01:00