如何删除iOS上图像的平方比例裁剪
问题描述:
我使用IOS标准图像裁剪功能(移动和缩放)裁剪我的图像,然后将其提交给服务器。如何删除iOS上图像的平方比例裁剪
然而,我认识到所提供的裁剪具有方形比(参见下图)
代码的摘录如下:
//set up image picker
self.imgPicker = [[[UIImagePickerController alloc] init]autorelease];
self.imgPicker.allowsEditing = YES;
self.imgPicker.delegate = self;
//Trigger get photo from library function
self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:self.imgPicker animated:YES];
如何可以允许“移动和缩放“编辑,同时允许用户在没有方形比例限制的情况下进行裁剪?
答
我认为你需要改变self.imgPicker.allowsEditing = YES;
到self.imgPicker.allowsEditing = NO;
的可能重复[如何改变的UIImagePickerController裁剪框(http://*.com/questions/998706/how-to-change-the-uiimagepickercontroller-crop-frame) – CodaFi 2012-04-13 03:42:59
你是对的CodaFi,这个问题已被询问遍及整个计算器。这个线程也可以是有用的,因为用户建议他的框架:http://*.com/questions/3740253/custom-crop-size-in-uiimagepickercontroller。这里是框架:https://github.com/yogev77/UIImagePickerWithEditor。但我没有使用它,所以我不能对此发表任何意见。 – rdurand 2012-08-21 11:33:28
有你的答案.. http://*.com/questions/9041732/set-dimensions-for-uiimagepickercontroller-move-and-scale-cropbox – 2012-12-21 09:08:49