update crop tool to latest, adjust to API changes (#9389)

This commit is contained in:
Samuel Newman
2025-11-14 21:05:31 +02:00
committed by GitHub
parent 1caac024ab
commit 7a8ab551e3
4 changed files with 10 additions and 7 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ export async function openCropper(opts: OpenCropperOptions) {
return {
path: item.path,
mime: item.mime,
mime: item.mimeType,
size: item.size,
width: item.width,
height: item.height,
+4 -1
View File
@@ -1,5 +1,6 @@
import ExpoImageCropTool, {type OpenCropperOptions} from 'expo-image-crop-tool'
import {type ImagePickerOptions, launchCameraAsync} from 'expo-image-picker'
import {t} from '@lingui/macro'
export {
openPicker,
@@ -31,13 +32,15 @@ export async function openCamera(customOpts: ImagePickerOptions) {
export async function openCropper(opts: OpenCropperOptions) {
const item = await ExpoImageCropTool.openCropperAsync({
doneButtonText: t`Done`,
cancelButtonText: t`Cancel`,
...opts,
format: 'jpeg',
})
return {
path: item.path,
mime: item.mime,
mime: item.mimeType,
size: item.size,
width: item.width,
height: item.height,