hhunaid / react-native-image-crop-tools

Native-ish Image Crop Tools for react native
171 stars 58 forks source link

The crop doesn't work anymore after the initial crop #59

Open wijayantoap opened 2 years ago

wijayantoap commented 2 years ago

It happens recently after I increase the compiled SDK to 30 because of this issue. I am not sure whether it is the cause or not. After that, whenever I tried to crop the image, the response that I got was like this {"height": 332, "uri": "/data/user/0/id.oftheapp/cache/temp_file_.jpg", "width": 592}. If I am not mistaken, previously the response uri that I got started with file/:..... And now, whenever I crop another picture and access that picture from the onImageCrop, I always got the first image that I cropped.

Hless commented 2 years ago

I don't get the same image everytime, this may be caused on your side due some sort of cache (FastImage).

That said, it seems like some things are a bit broken inside the lib now, and there's need of some small fixes. I think the change in URL is happening because with the new compile SDK the underyling CanHub library produces Content URI's that need to be translated to File URI's.

Proposed fixes:

I might be able to take a swing at a PR if I find the time for it.

Hless commented 2 years ago

@hhunaid If I make a PR to address these issues will it be merged? I see two open PR's at the moment.