Contents

lockBufferRepresentation(withPixelFormat:colorSpace:forBounds:)

Creates a memory buffer representation from a subregion of the image source using the provided pixel format and color space.

Declaration

func lockBufferRepresentation(withPixelFormat format: String!, colorSpace: CGColorSpace!, forBounds bounds: NSRect) -> Bool

Parameters

  • format:

    A pixel format that is compatible with the color space.

  • colorSpace:

    A Quartz color space that is compatible with the pixel format.

  • bounds:

    The bounds of the subregion, expressed as pixels, and aligned to integer boundaries.

Return Value

true if successful; otherwise false.

Discussion

The content of the buffer is read-only. You should not attempt to modify it.

See Also

Converting an Image to a Representation