CGImageSource
An opaque type that you use to read image data from a URL, data object, or data consumer.
Declaration
class CGImageSourceOverview
Use a CGImageSource type to read data efficiently for most image file formats. The image source object manages the data buffers needed to load the image data and performs any operations on that data to turn it into a usable image. For example, it decompresses data stored in a compressed format. You can also use an image source to fetch or create thumbnail images and access metadata stored with the image.
Create an image source object from a CFURL, CFData, or CGDataProvider data type. The image source object reads data from the specified type and extracts the image information for you.
For more information, see Image I/O Programming Guide.
Topics
Creating an Image Source
CGImageSourceCreateWithURL(_:_:)CGImageSourceCreateWithData(_:_:)CGImageSourceCreateWithDataProvider(_:_:)CGImageSourceCreateIncremental(_:)
Extracting Images From an Image Source
CGImageSourceCreateImageAtIndex(_:_:_:)CGImageSourceCreateThumbnailAtIndex(_:_:_:)CGImageSourceGetPrimaryImageIndex(_:)
Getting Information From an Image Source
CGImageSourceGetTypeID()CGImageSourceGetType(_:)CGImageSourceCopyTypeIdentifiers()CGImageSourceGetCount(_:)CGImageSourceCopyProperties(_:_:)CGImageSourceCopyPropertiesAtIndex(_:_:_:)CGImageSourceCopyAuxiliaryDataInfoAtIndex(_:_:_:)
Updating an Incremental Image
Getting the Image Status
Specifying the Read Options
kCGImageSourceTypeIdentifierHintkCGImageSourceShouldAllowFloatkCGImageSourceShouldCachekCGImageSourceShouldCacheImmediatelykCGImageSourceCreateThumbnailFromImageIfAbsentkCGImageSourceCreateThumbnailFromImageAlwayskCGImageSourceThumbnailMaxPixelSizekCGImageSourceCreateThumbnailWithTransformkCGImageSourceSubsampleFactor