UIImage
@property(nonatomic,readonly) UIImageOrientation imageOrientation; // this will affect how the image is composited
图片本身存在图片方向,在定义的枚举类型可以看到如下:
typedef NS_ENUM(NSInteger, UIImageOrientation) {
UIImageOrientationUp, // default orientation
UIImageOrientationDown, // 180 deg rotation
UIImageOrientationLeft, // 90 deg CCW
UIImageOrientationRight, // 90 deg CW
UIImageOrientationUpMirrored, // as above but image mirrored along other axis. horizontal flip
UIImageOrientationDownMirrored, // horizontal flip
UIImageOrientationLeftMirrored, // vertical flip
UIImageOrientationRightMirrored,// vertical flip
};
那么,相机拍照的照片方向是什么呢?
1. UIImageOrientationUp
右手横向拍摄照片2. UIImageOrientationDown
左手横向拍摄照片3. UIImageOrientationLeft
正常手持拍摄照片4. UIImageOrientationRight
倒置拍摄照片抓取的数据显示时这样的,但是感觉跟定义不太一样,后续继续跟进测试,抓一下数据查看。
网友评论