8
A
回答
7
從答案這個問題Set dimensions for UIImagePickerController 「move and scale」 cropbox
我推薦的解決方案是爲圖像拾取 禁用編輯和自己處理。例如,我將圖像放在一個可滾動的圖像視圖中。在圖像視圖頂部是固定位置 「作物指南視圖」,繪製用戶看到的作物指示圖。 假設指南視圖具有可見矩形的屬性(要保留的部分 )和邊緣寬度(要放棄的部分),您可以像這樣獲取修剪矩形。
這裏是鏈接Re-sizing + UIImage
0
請通過而另一些人不工作這個答案... 。:)
In ZBar project有一些示例應用程序,它採用條形碼的圖片。它允許移動和縮放圖像。我havnt看了看代碼。但是你可以嘗試作爲最後的選擇。
3
這是非常晚,但希望它會有所幫助。
在的UIImagePickerController委託方法imagePickerController:didFinishPickingMediaWithInfo:
的「移動」和「縮放」圖像通過UIImagePickerControllerEditedImage
鍵訪問這樣
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *img = (UIImage *)[info objectForKey: UIImagePickerControllerEditedImage];
// Do what you need to with that image
}
希望它可以幫助別人!
2
也許你正在尋找:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
[imagePicker setAllowsEditing:YES];
然後在委託方法:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *chosenImage = [info objectForKey:UIImagePickerControllerEditedImage];
if(!chosenImage) {
chosenImage = [info objectForKey:UIImagePickerControllerOriginalImage];
}
[self dismissViewControllerAnimated:YES completion:nil];
}
相關問題
- 1. 如何在Android中實現iPhone像「移動和縮放」功能的圖像?
- 2. iphone sdk如何從照片庫中獲取完整的圖像?
- 3. 如何從iphone照片庫實現刪除功能?
- 4. 如何從iphone照片庫中獲取照片總數。
- 5. 庫中的照片不會移動和縮放
- 6. 縮放圖庫在Android中觸摸圖片或如何在圖庫中實現圖片縮放動畫?
- 7. 如何從照片庫iphone獲取照片信息?
- 8. 使用UIScrollView和UIImageView實現簡單的照片庫像iPhone'照片'
- 9. 我可以從iPhone中的照片獲取圖像的名稱
- 10. 如何移動和縮放圖像
- 11. 移動和縮放圖像
- 12. 如何檢索圖像從數據庫路徑和顯示圖像路徑縮略圖像照片庫在iphone
- 13. 如何從照片庫中獲取圖像?
- 14. iPhone:如何從照片庫或相機將像iPhone照片應用程序的「編輯」功能也有所
- 15. 如何在iPhone中實現照片幻燈片放映?
- 16. 從照片庫使用照片框架獲取所有圖像
- 17. 從照片庫中獲取照片
- 18. 在iPhone中從照片庫中縮放並保存UIImage?
- 19. 從iphone照片庫中獲取照片並在表格視圖中顯示
- 20. 如何滑動照片庫圖像像iphonefollowing在iphone
- 21. 如何獲取我iPhone上的照片庫中的照片列表?
- 22. AngularJS和照片庫實現
- 23. 如何允許iPhone用戶「移動並縮放」已經選擇的照片
- 24. 保存圖像到iPhone的照片庫
- 25. 如何實現這種縮放和縮小功能
- 26. 使用UIImagepickercontroller從iPhone照片庫獲取照片
- 27. 實現平移和縮放
- 28. iPhone:如何實現android AlertDialog像功能?
- 29. 如何從iPhone中的圖庫中刪除選定的照片?
- 30. Jquery移動圖像縮放功能上滑動
您提供「簡銷售的答案」用的UIImage的委託方法,但我想這種類型的鏈接來自照片庫的圖像。那我該怎麼做呢? – Rohan 2012-03-01 13:19:31