callstack / react-native-image-editor

A library providing an API for cropping images from the web and the local file system.
MIT License
379 stars 118 forks source link

Support base64 Image output not only uri #53

Closed Rezaramdhanisti closed 7 months ago

Rezaramdhanisti commented 4 years ago

Feature Request

Support output base64. Currently, when cropping process is successful it return uri, some people maybe need base64.

Why it is needed

My backend only support base64 for upload images.

Possible implementation

Implement on native modules and create bridging to javascript.

Code sample

ImageEditor.cropImage(image, cropData).then(data => { console.log("Cropped image base64", data.base64); })

MorelSerge commented 4 years ago

You can always read out the file in base64 format using e.g. RNFS

firofame commented 2 years ago

react-native-fs works perfectly but it would have been awesome if I didn't have to install this package for just this feature.

retyui commented 11 months ago

you can also use react-native-blob-util file api

retyui commented 7 months ago

Fixed in 4.0.0