使用ios库读取原始图像

使用ios库读取原始图像,ios,objective-c,Ios,Objective C,我的问题可能很奇怪。我正在尝试从相机中获取原稿。它可以在大多数照片中使用。我的测试设备是iphone5。相机拍摄的图像的正常大小是3264和2448宽和高。但当我尝试从iphone的滤镜(单色、色调、黑色、淡入、镀铬、处理、转印或即时)功能拍摄的相机中获取照片时,我得到的图像尺寸更小。这是我的代码。谢谢 ALAssetsLibrary *assetLibrary=[[ALAssetsLibrary alloc] init]; [assetLibrary assetForURL:[appR

我的问题可能很奇怪。我正在尝试从相机中获取原稿。它可以在大多数照片中使用。我的测试设备是iphone5。相机拍摄的图像的正常大小是3264和2448宽和高。但当我尝试从iphone的滤镜(单色、色调、黑色、淡入、镀铬、处理、转印或即时)功能拍摄的相机中获取照片时,我得到的图像尺寸更小。这是我的代码。谢谢

ALAssetsLibrary *assetLibrary=[[ALAssetsLibrary alloc] init];
    [assetLibrary assetForURL:[appRecord valueForKey:UIImagePickerControllerReferenceURL] resultBlock:^(ALAsset *asset)
     {
         ALAssetRepresentation *rep = [asset defaultRepresentation];

         CGSize dimension = [rep dimensions];
         NSLog(@"%lld",[rep size])  ;
         NSLog(@"dimension %f and %f",dimension.width ,dimension.height);

         unsigned long imageSize = (unsigned long)[rep size];
         NSLog(@"%lu ",imageSize);

         uint8_t* imageBytes = malloc(imageSize);
         [rep getBytes:imageBytes fromOffset:0 length:imageSize error:nil];
         NSData *data = [NSData dataWithBytesNoCopy:imageBytes length:imageSize freeWhenDone:YES];
         UIImage *myImg =[UIImage imageWithData:data];

@TonyMkenu,我得到了IMG_0209.JPG.格式,比如“IMG_Number.JPG.最后我发现它是assets library.devforums.apple.com/message/1062519#1062519的一个bug