Creates a thumbnail image of the image located at a specified location in an image source.


CGImageRef CGImageSourceCreateThumbnailAtIndex(CGImageSourceRef isrc, size_t index, CFDictionaryRef options);



An image source.


The index that specifies the location of the image. The index is zero-based.


A dictionary that specifies additional creation options. See Image Source Option Dictionary Keys for the keys you can supply.

Return Value

A CGImage object. You are responsible for releasing this object using CGImageRelease.


If the image source is a PDF,  this function creates a 72 dpi image of the PDF page specified by the index that you pass. You must, however, pass an options dictionary that contains either the kCGImageSourceCreateThumbnailFromImageIfAbsent or kCGImageSourceCreateThumbnailFromImageAlways keys, with the value of the key set to TRUE.

See Also

Creating Images From an Image Source


Creates a CGImage object for the image data associated with the specified index in an image source.


Create an incremental image source.

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