Open azri92 opened 6 years ago
I do notice that cropOffsetX & cropOffsetY are provided in crop result but I'm not sure how to use these (and if they're sufficient to rebuild state).
@Legementarion It looks like with a bit of hacking it's possible to restore the cropping state. What I've done so far:
UCropView
(and I have a number of images in my activity) I save gesture view's matrixonImageLaidOut()
The only problem with above is that I cannot easily reset overlay's rectangle. Any ideas?
@maxtracking Maybe you can check out this PR (on a forked version): https://github.com/photobook-worldwide-mobile/uCrop/pull/1
@Legementarion let me know if you would like me to create a direct PR to this repo.
@azri92 Hi! Yep, I would like :) Create pull request please, for both branches, 'develop' and 'non_native' :)
@azri92 Thanks, I will have a look.
@azri92
https://github.com/photobook-worldwide-mobile/uCrop
I run your demo and get error below
java.lang.NullPointerException: Attempt to read from field 'float com.yalantis.ucrop.model.BleedPercentage.left' on a null object reference at com.yalantis.ucrop.view.OverlayView.drawBleedRects(OverlayView.java:569) at com.yalantis.ucrop.view.OverlayView.onDraw(OverlayView.java:390) at android.view.View.draw(View.java:21473)
Can you fix it. thanks
As of v 2.2.2, uCrop does not:
The goal is to enable users to continue editing the same image that was already edited based on the last saved state.
Ideas for this
Saved state to be returned post-crop should include:
To continue editing:
withSavedStateOption(matrix, cropRect)
in uCrop intent builder.CropImageView.onImageLaidOut()
, set up using saved state info provided if available.