CGImage

A bitmap image or image mask.

Overview

A bitmap (or sampled) image is a rectangular array of pixels, with each pixel representing a single sample or data point in a source image.

Topics

Creating Bitmap Images

CGImageCreate

Creates a bitmap image from data supplied by a data provider.

CGImageCreateCopy

Creates a copy of a bitmap image.

CGImageCreateCopyWithColorSpace

Creates a copy of a bitmap image, replacing its colorspace.

CGImageCreateWithJPEGDataProvider

Creates a bitmap image using JPEG-encoded data supplied by a data provider.

CGImageCreateWithPNGDataProvider

Creates a bitmap image using PNG-encoded data supplied by a data provider.

CGImageCreateWithImageInRect

Creates a bitmap image using the data contained within a subregion of an existing bitmap image.

CGImageCreateWithMask

Creates a bitmap image from an existing image and an image mask.

CGImageCreateWithMaskingColors

Creates a bitmap image by masking an existing bitmap image with the provided color values.

Creating an Image Mask

CGImageMaskCreate

Creates a bitmap image mask from data supplied by a data provider.

Retaining and Releasing Images

CGImageRetain

Increments the retain count of a bitmap image.

CGImageRelease

Decrements the retain count of a bitmap image.

Getting the CFType ID

CGImageGetTypeID

Returns the type identifier for CGImage objects.

Getting Information About an Image

CGImageGetAlphaInfo

Returns the alpha channel information for a bitmap image.

CGImageGetBitmapInfo

Returns the bitmap information for a bitmap image.

CGImageGetBitsPerComponent

Returns the number of bits allocated for a single color component of a bitmap image.

CGImageGetBitsPerPixel

Returns the number of bits allocated for a single pixel in a bitmap image.

CGImageGetBytesPerRow

Returns the number of bytes allocated for a single row of a bitmap image.

CGImageGetColorSpace

Return the color space for a bitmap image.

CGImageGetDataProvider

Returns the data provider for a bitmap image.

CGImageGetDecode

Returns the decode array for a bitmap image.

CGImageGetHeight

Returns the height of a bitmap image.

CGImageGetShouldInterpolate

Returns the interpolation setting for a bitmap image.

CGImageGetRenderingIntent

Returns the rendering intent setting for a bitmap image.

CGImageGetWidth

Returns the width of a bitmap image.

CGImageIsMask

Returns whether a bitmap image is an image mask.

Data Types

CGImageRef

A bitmap image or image mask.

Constants

CGImageAlphaInfo

Storage options for alpha component data.

CGBitmapInfo

Component information for a bitmap image.

Host Endian Bitmap Formats

Bit-depth constants for image bitmaps in host-endian byte order.

See Also

Opaque Types

CGBitmapContext

A type of CGContextRef that you can use for drawing bits to memory.

CGColor

A set of components that define a color, with a color space specifying how to interpret them.

CGColorConversionInfo

An object that describes how to convert between color spaces for use by other system services.

CGColorSpace

A profile that specifies how to interpret a color value for display.

CGContext

A Quartz 2D drawing destination.

CGDataConsumer

An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer.

CGDataProvider

An abstraction for data-reading tasks that eliminates the need to manage a raw memory buffer.

CGFont

A set of character glyphs and layout information for drawing text.

CGFunction

A general facility for defining and using callback functions.

CGGLContext

Deprecated. A type of CGContextRef for drawing OpenGL content.

CGGradient

A definition for a smooth transition between colors for drawing radial and axial gradient fills.

CGLayer

An offscreen context for reusing content drawn with Core Graphics.

CGPath

Immutable and mutable types for graphics paths: mathematical descriptions of shapes or lines to be drawn in a graphics context.

CGPattern

A 2D pattern to be used for drawing graphics paths.

CGPDFArray

An array structure within a PDF document.

CGPDFContentStream

A representation of one or more content data streams in a PDF page.

CGPDFContext

A type of CGContextRef for drawing PDF content.

CGPDFDictionary

A dictionary structure within a PDF document.

CGPDFDocument

A document that contains PDF (Portable Document Format) drawing information.

CGPDFObject

An object representing content within a PDF document.

CGPDFOperatorTable

A set of callback functions for operators used when scanning content in a PDF document.

CGPDFPage

A page in a PDF document.

CGPDFScanner

A parser object for handling content and operators in a PDF content stream.

CGPDFStream

A stream or sequence of data bytes in a PDF document.

CGPDFString

A text string in a PDF document.

CGPSConverter

An object that converts PostScript data to PDF data.

CGShading

A definition for a smooth transition between colors, controlled by a custom function you provide, for drawing radial and axial gradient fills.