kCGImagePropertyExifDictionary 引用错误

使用 AVFoundation拍照

    //获取图片
    [outputImage captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) {
        CFDictionaryRef exifAttachments = CMGetAttachment(imageSampleBuffer, kCGImagePropertyExifDictionary, nil);
        if (exifAttachments) {
        }
        // 获取图片数据
        NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
        UIImage *thePhoto = [[[UIImage alloc] initWithData:imageData] autorelease];
        smallInfoImage.image = thePhoto;
        
        
        //保存图片到本地及数据库;
        [self writeImageToFile:thePhoto];
        


        
        

    }];

 

错误:kCGImagePropertyExifDictionary", referenced from

 

修复方法:

添加库

  • ImageIO.framework
  • #import <ImageIO/CGImageProperties.h>

相关文章:

  • 2021-07-01
  • 2022-01-28
  • 2021-06-26
  • 2021-06-29
  • 2021-12-02
  • 2022-01-29
  • 2022-02-13
  • 2021-07-16
猜你喜欢
  • 2021-10-17
  • 2022-12-23
  • 2021-10-17
  • 2021-06-25
  • 2021-05-20
  • 2021-07-27
相关资源
相似解决方案