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

Can't save cropped image, UnsupportedOperationException #113

Closed
OleksandrYev opened this issue Aug 4, 2017 · 5 comments
Closed

Can't save cropped image, UnsupportedOperationException #113

OleksandrYev opened this issue Aug 4, 2017 · 5 comments

Comments

@OleksandrYev
Copy link

java.lang.UnsupportedOperationException
at java.util.AbstractList.add(AbstractList.java:404)
at java.util.AbstractList.add(AbstractList.java:425)
at com.isseiaoki.simplecropview.util.Utils.copyExifInfo(Utils.java:85)
at com.isseiaoki.simplecropview.CropImageView.saveImage(CropImageView.java:1316)
at com.isseiaoki.simplecropview.CropImageView.access$2100(CropImageView.java:58)
at com.isseiaoki.simplecropview.CropImageView$17.call(CropImageView.java:1861)
at com.isseiaoki.simplecropview.CropImageView$17.call(CropImageView.java:1858)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:35)

I catch this Exception when tried to save image, my code:

mCropView.crop(mCropView.getSourceUri())
                    .executeAsSingle()
                    .flatMap(bitmap -> {
                        Timber.d("On crop, image size: %dx%d", bitmap.getWidth(), bitmap.getHeight());
                        return mCropView.save(bitmap)
                                .executeAsSingle(saveUri);
                    })
                    .subscribeOn(Schedulers.newThread())
                    .observeOn(AndroidSchedulers.mainThread())
                    .subscribe(uri -> {
                        Timber.d("On Crop, croppedPhotoUri: %s", uri);
                        dismiss();
                    }, throwable -> Timber.e(throwable));

How can I resolve this issue ?

@igreenwood
Copy link
Owner

Oh...I will fix it ASAP.

@igreenwood
Copy link
Owner

@AlexEvtushik
Could you tell me your OS version?

@OleksandrYev
Copy link
Author

@IsseiAoki Android 6.0.1

@igreenwood
Copy link
Owner

@AlexEvtushik
I have fixed the bug and released new version.
Please try version 1.1.6 : )

@OleksandrYev
Copy link
Author

@IsseiAoki now it works like a charm, thanks a lot!

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

2 participants