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

support for existing image #1

Closed
kidvicious opened this issue Feb 15, 2018 · 2 comments
Closed

support for existing image #1

kidvicious opened this issue Feb 15, 2018 · 2 comments

Comments

@kidvicious
Copy link

I need to crop the image after capturing it with the camera, not using the picker

@jvk75
Copy link
Owner

jvk75 commented Feb 15, 2018

Hi,

With version 1.2.0 you can do following.

// create cropper instance
let cropper = UIImageCropper(cropRatio: 2/3)

// give image to cropper which needs cropping
cropper.image = UIImage(named: "myImage")

// present the cropper on top of your view controller
viewController.present(self, animated: true, completion: nil)

...

// Get the cropped image from delegate method
func didCropImage(originalImage: UIImage?, croppedImage: UIImage?) {
   // croppedImage
}

See the updated example for more details.

BR
/Jari

@jvk75
Copy link
Owner

jvk75 commented Mar 1, 2018

I shall close the issue as there is no more action in it.

@jvk75 jvk75 closed this as completed Mar 1, 2018
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