我目前有一個應用程序使用ALAsssetsLibrary來獲取照片。我已將照片放置在圖像視圖中,並且可以上傳到服務器。在拍攝一些照片後,當我在真實設備上進行測試時,我發現應該在肖像中拍攝的照片成爲景觀。方向與ALAsset中的照片無法正確對應
因此,我叫不同的函數來獲取CGImage這樣的:
UIImage *image = [UIImage imageWithCGImage:[representation fullResolutionImage] scale:1.0 orientation:(UIImageOrientation)[representation orientation]];
第一個嘗試了,我用這個:
UIImage *image = [UIImage imageWithCGImage:[representation fullResolutionImage]]
我想到了一個具有規模和方向可以給我是拍攝照片的正確方向。但它沒有給我正確的解決方案。
我是否錯過了生成照片的正確方向所需的任何內容?
從設備拍攝的照片發生此問題 – Leena 2012-01-12 09:49:02