callstack / react-native-image-editor

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

What Mime is supported/returned #65

Closed MathieuUrstein closed 5 months ago

MathieuUrstein commented 4 years ago

Question

The documentation never refers to Mimes.

In the usage example documentation, there is a mismatch between the log uri & the param url:

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

The promise probably returns an uri right?

- ImageEditor.cropImage(uri, cropData).then(url => {
+ ImageEditor.cropImage(uri, cropData).then(uri => {
-    console.log("Cropped image uri", url);
+    console.log("Cropped image uri", uri);
})

In the documentation you mention:

Remember to delete the cropped image from the cache path when you are done with it.

The documentation does not give an example for that, neither can I find one in the example app. It would be welcomed to have such an example 😀.

I'm writing this as an issue instead of a stackoverflow question because this should end up as a PR to at least correct the README usage example uri/url mismatch

retyui commented 5 months ago

Hi @MathieuUrstein README was updated and library API has changed to make it more clear to understand