- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/Julioacarrettoni/UIImageView_FaceAwareFill
软件介绍
缩放照片到一个固定区域时,能够尽量让人脸居中。详细说明如下:
对于将图片缩放到一个固定的矩形区域来说,一般有两种缩放方式,一种是Scale to fill,也就是将图片不按照长宽比缩放,一种是Aspect to fill,将图片按照长宽比来缩放。但是这两种缩放对于人像图片来说,效果都不理想,要么会将人像变形(Scale to fill),要么人脸会跑到边缘(Aspect to fill)。这份代码提出第三种缩放方式:FaceAwareFill。也就是检测到人脸之后,在保证按照长宽比缩放的情况下,能够尽量让人脸居中。支持一张照片出现多张人脸。
Demo展示的每张效果图中,前三幅图都是按照一般的缩放方式,效果都很不好。最后一幅图是按照FaceAwareFill缩放方式,可以看到人脸基本都居中显示。 [Code4App.com]
Automate This
Christopher Steiner / Portfolio / 2013-8-9 / USD 25.95
"The rousing story of the last gasp of human agency and how today's best and brightest minds are endeavoring to put an end to it." It used to be that to diagnose an illness, interpret legal docume......一起来看看 《Automate This》 这本书的介绍吧!
