这是具有图像数据的方法,该图像将比写入相机胶卷
CGImageRef cgImageResult = [self newSquareOverlayedImageForFeatures:features
inCGImage:srcImage
withOrientation:curDeviceOrientation
frontFacing:isUsingFrontFacingCamera];
if (srcImage)
CFRelease(srcImage);
CFDictionaryRef attachments = CMCopyDictionaryOfAttachments(kCFAllocatorDefault,
imageDataSampleBuffer,
kCMAttachmentMode_ShouldPropagate);
[self writeCGImageToCameraRoll:cgImageResult withMetadata:(id)attachments];