Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image saves with the same name #62

Closed
abdul-rafeh opened this issue Jan 26, 2022 · 12 comments
Closed

Image saves with the same name #62

abdul-rafeh opened this issue Jan 26, 2022 · 12 comments

Comments

@abdul-rafeh
Copy link

Image is saved with the same name hence it is always picking the initial image after cropping

@QasimJaffry
Copy link

same here... anyone?

@AdnanAshraf7
Copy link

we faced the same issue .
We solved it by moving that image to different location with different name using react-native-fs .

@efstathiosntonas
Copy link
Collaborator

efstathiosntonas commented Feb 28, 2022

Found the issue in this line:

map.putString("uri", result.getUriFilePath(reactContext).toString())

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.

@hhunaid
Copy link
Owner

hhunaid commented Mar 8, 2022

@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 hhunaid closed this as completed Mar 8, 2022
@efstathiosntonas
Copy link
Collaborator

@hhunaid no worries, sorry if I sounded aggressive! Do you want to make me a collaborator to help on my free time?

@geakk
Copy link

geakk commented Mar 27, 2022

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.

@hhunaid
Copy link
Owner

hhunaid commented Mar 29, 2022

Are you still interested @efstathiosntonas ?

@efstathiosntonas
Copy link
Collaborator

@hhunaid sure, just add me as a collaborator. I’ll try to keep it up.

@geakk
Copy link

geakk commented Mar 29, 2022

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!

@efstathiosntonas
Copy link
Collaborator

@geakk this should be fixed on 1.6.2, have you tried it out?

@geakk
Copy link

geakk commented Mar 29, 2022

Yes, I am using 1.6.2... strange
"react-native-image-crop-tools": "^1.6.2"

@geakk
Copy link

geakk commented Mar 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants