Creates a thumbnail image of the image located at a specified location in an image source.
SDKs
- iOS 4.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Image I/O
Declaration
CGImage Ref CGImageSourceCreateThumbnailAtIndex(CGImage Source Ref isrc, size _t index, CFDictionary Ref options);
Parameters
isrc
An image source.
index
The index that specifies the location of the image. The index is zero-based.
options
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 CGImage
.
Discussion
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 k
or k
keys, with the value of the key set to TRUE
.