Type Method


Returns an NSData representation of a still image data and metadata attachments in a JPEG sample buffer.


+ (NSData *)jpegStillImageNSDataRepresentation:(CMSampleBufferRef)jpegSampleBuffer;



The sample buffer carrying JPEG image data, optionally with Exif metadata sample buffer attachments.

This method throws an NSInvalidArgumentException if jpegSampleBuffer is NULL or not in the JPEG format.

Return Value

An NSData representation of jpegSampleBuffer.


This method merges the image data and Exif metadata sample buffer attachments without recompressing the image.

The returned NSData object is suitable for writing to disk.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software