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

How can I get pure cropRect without image like ToCropViewController #4

Closed
kobunketsu opened this issue Nov 19, 2020 · 1 comment
Closed

Comments

@kobunketsu
Copy link

Hi, thank you for writing such a good framework, implementing a system photo crop editor becomes so easy with it now. But I have some problem while using it. It is hard to get a pure cropRect which size is relative to the original image's size. I don't really need the cropped image rendered, only the size matters, but I have no idea how to retrieve it through the method:

public func cropped(withCropperState cropperState: CropperState) -> UIImage?

Can you give me some hint how to do it?

@qchenqizhi
Copy link
Owner

You can get all the information you need through the CropperViewControllerDelegate's cropperDidConfirm(_:state:).
But you need to calculate it yourself through CropperState

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