Giter Site home page Giter Site logo

kristiandelay / uiimageview_faceawarefill Goto Github PK

View Code? Open in Web Editor NEW

This project forked from julioacarrettoni/uiimageview_faceawarefill

0.0 3.0 0.0 3.1 MB

This category applies Aspect Fill content mode to an image and if faces are detected it centers them instead of centering the image just by its geometrical center.

License: MIT License

uiimageview_faceawarefill's Introduction

FaceAwareFill

Version Platform

This category applies Aspect Fill content mode to an image and if faces are detected it centers them instead of centering the image just by its geometrical center.

Based on this awesome post by @maniacdev

Based on this awesome post by @maniacdev

Example:

image

Installation

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

pod "FaceAwareFill"

Usage

Import the category to your .m file or to your "prefix" file.

#import "UIImageView+UIImageView_FaceAwareFill.h"

Then AFTER setting the image property of a UIImageView do:

[imageView faceAwareFill];

That's all.

Enjoy!

Debugging

A red rectangle can optionally be displayed on faces for debugging.

To enable, add the following value to the preprocessor macros:

DEBUGGING_FACE_AWARE_FILL

Author

Julio Andrés Carretttoni, @dev_jac

Notes:

License

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

uiimageview_faceawarefill's People

Contributors

julioacarrettoni avatar chancefeick avatar

Watchers

kdelay avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.