使用ZXingObjC选取相册里的照片进行扫码时注意

_imagePickerController.allowsEditing = YES;    //一定要选择允许编辑


 

UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage”];   //image一定要取选择框范围内的图片


 

info == {

 

    UIImagePickerControllerCropRect = "NSRect: {{0, 0}, {2272, 1704}}";

 

    UIImagePickerControllerEditedImage = "<UIImage: 0x16e3d150> size {640, 480} orientation 0 scale 1.000000";

 

    UIImagePickerControllerMediaType = "public.image";

 

    UIImagePickerControllerOriginalImage = "<UIImage: 0x16e263f0> size {2272, 1704} orientation 0 scale 1.000000";

 

    UIImagePickerControllerReferenceURL = "assets-library://asset/asset.JPG?id=E9FB04A9-2E0E-407B-9B87-FEBBF4F27A12&ext=JPG";

 

}



原文地址:https://www.cnblogs.com/allen123/p/4488458.html