allow for custom cropper aspect ration based on image

This commit is contained in:
Piotr P 2024-04-27 14:23:11 +02:00
parent ebd333b331
commit bc956803b8
3 changed files with 30 additions and 5 deletions

View file

@ -17,6 +17,10 @@ export async function openCropper(opts: CropperOptions): Promise<RNImage> {
unstable__openModal({
name: 'crop-image',
uri: opts.path,
dimensions:
opts.height && opts.width
? {width: opts.width, height: opts.height}
: undefined,
onSelect: (img?: RNImage) => {
if (img) {
resolve(img)