A Swift extension for UIImageView that automatically detects and focuses on faces within images, preventing awkward cropping.
FaceAware is a Swift library that extends UIImageView to automatically detect and focus on faces within images. It solves the problem of poorly cropped avatars or profile pictures by using Core Image's face detection to ensure faces remain centered and visible. This is especially useful for apps displaying user photos where aspect fill cropping often cuts off faces.
iOS developers building apps that display user avatars, profile pictures, or any photo-centric UI where face visibility is important. It's ideal for social media, messaging, or dating apps.
Developers choose FaceAware because it's a lightweight, easy-to-integrate solution that requires minimal code to significantly improve user experience. Unlike manual cropping or generic aspect fill, it intelligently preserves faces, reducing user frustration with poorly cropped images.
An extension that gives UIImageView the ability to focus on faces within an image.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers @IBDesignable and @IBInspectable properties, allowing visual setup without code, as shown in the README's screenshot for easy configuration.
Simple to use with properties like focusOnFaces or set(image:focusOnFaces:), reducing implementation effort to just a few lines of Swift.
Includes a debug mode to visualize detected faces with red squares and provides closure callbacks for completion events, aiding testing and integration.
Automatically centers faces in UIImageViews using Core Image detection, effectively preventing awkward face crops in avatars and profile pictures.
Relies on Core Image's face detection, which can be CPU-intensive and slow for large images or multiple displays, potentially affecting app responsiveness.
Automatically adjusts cropping without options for fine-tuning, such as focusing only on the largest face—a feature noted as future work in the README.
Tied to UIKit and UIImageView, making it unsuitable for SwiftUI, macOS, or cross-platform projects without significant adaptation.