다음 샘플을 참조하십시오. PhotoDisplayViewController.m에서 다음 두 가지 경우를 테스트하면 자동으로 답변을 얻을 수 있습니다.
사례 1 : UIImageOrientation
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation];
UIImage *fullScreenImage = [UIImage imageWithCGImage:[assetRepresentation fullScreenImage] scale:[assetRepresentation scale] orientation:(UIImageOrientation)[assetRepresentation orientation]];
사례 2 : 밖으로 UIImageOrientation
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation];
UIImage *fullScreenImage = [UIImage imageWithCGImage:[assetRepresentation fullScreenImage] scale:[assetRepresentation scale] orientation:nil];
을 가진 당신에서 읽고
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
을 다음과 같은 몇 가지 방향을 가지고 주장(210)
는 SO 다운로드이 샘플 데모를 통해 이동하시기 바랍니다
MyImagePicker Demo
참고 : 당신은 당신이
NSUInteger groupTypes = ALAssetsGroupAlbum | ALAssetsGroupEvent | ALAssetsGroupFaces|ALAssetsGroupLibrary|ALAssetsGroupSavedPhotos|ALAssetsGroupPhotoStream;
을 다음과 같은 RootViewController.m 코드를 변경해야하는 모든 앨범에서 표시하려는 경우
내가 모든 이미지에 대한 이미지 방향을 얻고 있지만, 어떤 이미지가 회전 중입니다. 시도해 보았습니다. (temp.albumPictureClass == UIImageOrientationUP) {NSLog (@ "Up");} 모든 이미지가이 메시지를 인쇄했습니다. – Durgaprasad
즉, 이미지 방향이 모두 "위로"있음을 의미합니다.이미지가 90도 회전하고 코드로 회전합니다. 영어가 매우 안좋아서 제가 말한 것을 이해할 수 있는지 확신 할 수 없습니다. --!죄송합니다! – iuser1969782
예. 알겠습니다. 나는 당신의 방법을 받아 들였습니다. 그것은 완벽. 고맙습니다. – Durgaprasad