Latest 1.0.0
Homepage https://github.com/KimDarren/FaceCropper
License MIT
Platforms ios 11.0
Frameworks UIKit, Vision
Authors

Version
License

Requirements

  • Xcode 9.0 (beta) or higher.
  • iOS 11.0 (beta) or higher.
    • (It is possible to import this library under the iOS 11. But it won’t be working.)

Usage

  • Crop faces from your image (UIImage or CGImage) in the easy way.
let image = UIImage(named: "image_contains_faces")
image.face.crop { result in
  switch result {
  case .success(let faces):
    // When the `Vision` successfully find faces, and `FaceCropper` cropped it.
    // `faces` argument is a collection of cropped images.
  case .notFound:
    // When the image doesn't contain any face, `result` will be `.notFound`.
  case .failure(let error):
    // When the any error occured, `result` will be `failure`.
  }
}

Example

Example app screenshot

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

FaceCropper is available through CocoaPods.
To install it, simply add the following line to your Podfile:

pod "FaceCropper"

Author

KimDarren, [email protected]

License

FaceCropper is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "FaceCropper",
    "version": "1.0.0",
    "summary": "Crop faces, inside of your image, with Vision",
    "homepage": "https://github.com/KimDarren/FaceCropper",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "KimDarren": "[email protected]"
    },
    "source": {
        "git": "https://github.com/KimDarren/FaceCropper.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source_files": "FaceCropper/Classes/**/*",
    "frameworks": [
        "UIKit",
        "Vision"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This