Skip to content

Releases: SecondHandHelper/react-native-vision-camera

iPhone 17 pro crash fix

05 Dec 12:14

Choose a tag to compare

This merges the changes in mrousavy#3677

Thumbnail support

15 Oct 06:17

Choose a tag to compare

feat: Add onThumbnailReady callback for photo capture

Add support for generating thumbnails during photo capture with an
asynchronous callback that fires before the full photo is saved. This
enables instant preview functionality and better UX in camera
applications.

**Changes:**
- Add `thumbnailSize` and `onThumbnailReady` options to
  `TakePhotoOptions`
- Add `ThumbnailFile` type for thumbnail metadata
- iOS: Extract embedded thumbnail from AVCapturePhoto using ImageIO for
  maximum performance
- Android: Implement memory-efficient downsampling with
  hardware-accelerated decoding
- Add event bridge `onThumbnailReady` for both platforms
- Update documentation with usage examples and platform implementation
  details
- Add thumbnail display in example app

**Platform implementations:**
- iOS: Uses embedded thumbnail from camera capture if available
- Android: Uses BitmapFactory.Options.inSampleSize for efficient
  downsampling without loading full image into memory

Both implementations are asynchronous and non-blocking.

Tested on iPhone 14, iOS 18.6.2
Android implementation compiles successfully (needs device testing)