Latest 0.2.0
Homepage https://github.com/MichaelTzach/MTZImageFacePan
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

[![CI Status](http://img.shields.io/travis/Michael Tzach/MTZImageFacePan.svg?style=flat)](https://travis-ci.org/Michael Tzach/MTZImageFacePan)
Version
License
Platform

Usage

ImageFacePan is easy to use. It has two class methods that render a UIImage from another UIImage.
The simple way to use it, is to use

+(UIImage *)renderImageFromImage:(UIImage *)image toFitSize:(CGSize)destinationSize;

When using this method, all you have to do is pass the image and the destination size of the image. the rendering will crop the image to put all faces in the frame without zooming. This method uses the destination size’s aspect ratio.

If cropping without a zoom is not enough, you should use

+(UIImage *)renderImageFromImage:(UIImage *)image withOptions:(MTZImageFacePanOptions *)options;

This method requires you to pass it an options object where you can set a minimumWidth, minimumHeight and maximumZoomFactor. This allows panning with zooming.

Purpose

This library is for all the cases where when you are using fill in an imageView and some of the faces in the image are left out of the frame.

Use Examples

Original Image

Horizontal Aspect ratio

More examples in the /Pod/Assets folder

Installation

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

pod "MTZImageFacePan"

Author

Michael Tzach, [email protected]

License

Copyright 2013-2016 Jive Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Latest podspec

{
    "name": "MTZImageFacePan",
    "version": "0.2.0",
    "summary": "A solution for making sure all faces appear in an image",
    "homepage": "https://github.com/MichaelTzach/MTZImageFacePan",
    "platforms": {
        "ios": "7.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "YOURNAME": "Michael Tzach"
    },
    "source": {
        "git": "https://github.com/MichaelTzach/MTZImageFacePan.git",
        "tag": "0.2.0"
    },
    "frameworks": "UIKit",
    "source_files": "Pod/Classes/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This