https://github.com/mwaqasbhati/wbimagecropper
An Innovative Image Cropper with which you can crop and adjust your profile pictures
https://github.com/mwaqasbhati/wbimagecropper
crop editing editing-capabilites image profile-picture swift
Last synced: 4 months ago
JSON representation
An Innovative Image Cropper with which you can crop and adjust your profile pictures
- Host: GitHub
- URL: https://github.com/mwaqasbhati/wbimagecropper
- Owner: mwaqasbhati
- License: mit
- Created: 2015-11-23T17:16:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-02T05:45:33.000Z (almost 8 years ago)
- Last Synced: 2026-01-21T05:49:05.588Z (5 months ago)
- Topics: crop, editing, editing-capabilites, image, profile-picture, swift
- Language: Swift
- Homepage:
- Size: 3.82 MB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WBImageCropper
[](https://cocoapods.org/pods/WBImageCropper)
[](https://cocoapods.org/pods/WBImageCropper)
[](https://cocoapods.org/pods/WBImageCropper)
WBImageCropper works for all type of input cropping mask and is implemented in Swift.*
## About
WBImageCropper will provide you image editing & cropping functionality by just calling a 2 line to code. It made things easy that was never before.
## Background
I have used many cropping tools but this library provides cropping stuff very user friendly.
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Usage
- First Create a WBImageCropper Object with Image and Cropping Mask and then confirm to it's delegate
```swift
let croppingView = WBImageCropperVC(CGRect(x: 0, y: view.frame.size.height/2, width: view.frame.size.width, height: 200), image: UIImage(named: "world")!)
croppingView.delegate = self
present(croppingView, animated: true, completion: nil)
```
### ImageCropperDelegate
```swift
func pickedImageDidFinish(_ image: UIImage)
func pickedImageDidCancel(_ image: UIImage?)
```
| Square Mask | Rectangle Mask |
|---------------------------------|------------------------------|
|||
## Requirements
- iOS 9.4
- Swift 4.1
## Installation
### Manually
Download the Code and Copy the file -> `WBImageCropper.swift` into your project. That's it.
### CocoaPods
WBImageCropper is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'WBImageCropper'
```
## Author
mwaqasbhati, m.waqas.bhati@hotmail.com
## License
WBImageCropper is available under the MIT license. See the LICENSE file for more info.