我正在尝试将上述类别用于UIImage
-在这里找到
使用的原因是我让用户使用相机/选择器拍照。然后我需要显示在UIImageView
.
我想保留图像的方向信息,但稍微缩小它,以获得性能并最适合图像视图。
我如何实现使用这个类别?我不确定如何调用猫,我是否以某种方式调用该方法?
目前,我有一些选择器的委托方法:
#pragma mark - UIImagePickerDelegate Methods
//delegate methode will be called after picking photo either from camera or library
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissViewControllerAnimated:YES completion:nil];
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
self.collectedImage = image;
NSLog(@"the collect image orientation is: %i",image.imageOrientation);