Closed abdul-rafeh closed 2 years ago
same here... anyone?
we faced the same issue . We solved it by moving that image to different location with different name using react-native-fs .
Found the issue in this line: https://github.com/hhunaid/react-native-image-crop-tools/blob/2a2c453e6c24f9bb5c1736db45d092cad939601e/android/src/main/java/com/parsempo/ImageCropTools/ImageCropViewManager.kt#L35
it should be
map.putString("uri", result.getUriFilePath(reactContext, true).toString())
but beware because the canhub cropper states on function's doc:
/**
* The file path of the image to load
* Null if get cropped image was executed, no output requested or failure.
*
* @param uniqueName If true, make each image cropped have a different file name, this could
* cause memory issues, use wisely. [Default: false]
*/
I won't submit a PR, @hhunaid has not merged my previous ones with the serious bug on ios image rotation so I won't bother creating a new one.
@efstathiosntonas I have more or less abandoned the project because I no longer work with React Native. Sorry you felt it was personal. PRs take some time to review which I simply did not have. That said I have merged your changes now.
@hhunaid no worries, sorry if I sounded aggressive! Do you want to make me a collaborator to help on my free time?
Would be very cool if @efstathiosntonas could be a collaborator! I have seen how invested he is in the project and it would be sad this cool library goes to waste.
Are you still interested @efstathiosntonas ?
@hhunaid sure, just add me as a collaborator. I’ll try to keep it up.
Glad to hear this @hhunaid !!!
@efstathiosntonas Did you have a fix for this issue ? I am trying to make it work on Android and it does not seem to work out!
@geakk this should be fixed on 1.6.2, have you tried it out?
Yes, I am using 1.6.2... strange
"react-native-image-crop-tools": "^1.6.2"
Basically, I can open the modal and use the ui to crop the image, but I can't seem to be able to 'confirm' the crop and get the new image.
Tried debugging but onImageCrop
is not returning anything on Android. Haven't tried on iOS yet.
Image is saved with the same name hence it is always picking the initial image after cropping