Mac Developer Library

Developer

QuartzCore Framework Reference CIImageAccumulator Class Reference

Options
Deployment Target:

On This Page
Language:

CIImageAccumulator

Inheritance


Conforms To


Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


OS X v10.4 and later

The CIImageAccumulator class enables feedback-based image processing for such things as iterative painting operations or fluid dynamics simulations. You use CIImageAccumulator objects in conjunction with other Core Image classes, such as CIFilter, CIImage, CIVector, and CIContext, to take advantage of the built-in Core Image filters when processing images.

  • Creates an image accumulator with the specified extent and pixel format.

    Declaration

    Objective-C

    + (CIImageAccumulator *)imageAccumulatorWithExtent:(CGRect)extent format:(CIFormat)format

    Parameters

    extent

    A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

    format

    The format and size of each pixel. You must supply a pixel format constant, such as kCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

    Return Value

    The image accumulator object.

    Import Statement

    Objective-C

    @import QuartzCore;

    Availability

    OS X v10.4 and later.

  • Creates an image accumulator with the specified extent, pixel format, and color space.

    Declaration

    Objective-C

    + (CIImageAccumulator *)imageAccumulatorWithExtent:(CGRect)extent format:(CIFormat)format colorSpace:(CGColorSpaceRef)colorSpace

    Parameters

    extent

    A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

    format

    The format and size of each pixel. You must supply a pixel format constant, such as kCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

    colorSpace

    A CGColorSpaceRef object describing the color space for the image accumulator.

    Return Value

    The image accumulator object.

    Import Statement

    Objective-C

    @import QuartzCore;

    Availability

    OS X v10.7 and later.

  • Initializes an image accumulator with the specified extent and pixel format.

    Declaration

    Swift

    init!(extent extent: CGRect, format format: CIFormat)

    Objective-C

    - (id)initWithExtent:(CGRect)extent format:(CIFormat)format

    Parameters

    extent

    A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

    format

    The format and size of each pixel. You must supply a pixel format constant, such askCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

    Return Value

    The initialized image accumulator object.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Initializes an image accumulator with the specified extent, pixel format, and color space.

    Declaration

    Swift

    init!(extent extent: CGRect, format format: CIFormat, colorSpace colorSpace: CGColorSpace!)

    Objective-C

    - (id)initWithExtent:(CGRect)extent format:(CIFormat)format colorSpace:(CGColorSpaceRef)colorSpace

    Parameters

    extent

    A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

    format

    The format and size of each pixel. You must supply a pixel format constant, such askCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

    colorSpace

    A CGColorSpaceRef object describing the color space for the image accumulator.

    Return Value

    The initialized image accumulator object.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.7 and later.

  • Sets the contents of the image accumulator to the contents of the specified image object.

    Declaration

    Swift

    func setImage(_ im: CIImage!)

    Objective-C

    - (void)setImage:(CIImage *)im

    Parameters

    im

    The image object whose contents you want to assign to the image accumulator.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Updates an image accumulator with a subregion of an image object.

    Declaration

    Swift

    func setImage(_ im: CIImage!, dirtyRect r: CGRect)

    Objective-C

    - (void)setImage:(CIImage *)im dirtyRect:(CGRect)r

    Parameters

    im

    The image object whose contents you want to assign to the image accumulator.

    r

    A rectangle that defines the subregion of the image object that’s changed since the last time you updated the image accumulator. You must guarantee that the new contents differ from the old only within the region specified by the this argument.

    Discussion

    For additional details on using this method, see “Imaging Dynamical Systems” in Core Image Programming Guide.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

    See Also

    – setImage:

  • Returns the extent of the image associated with the image accumulator.

    Declaration

    Swift

    func extent() -> CGRect

    Objective-C

    - (CGRect)extent

    Return Value

    The rectangle that specifies the size of the image associated with the image accumulator. This rectangle is the size of the complete region of the working coordinate space, and is a fixed area. It specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Returns the pixel format of the image accumulator.

    Declaration

    Swift

    func format() -> CIFormat

    Objective-C

    - (CIFormat)format

    Return Value

    The pixel format of the image accumulator.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Returns the current contents of the image accumulator.

    Declaration

    Swift

    func image() -> CIImage!

    Objective-C

    - (CIImage *)image

    Return Value

    The image object that represents the current contents of the image accumulator.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Resets the accumulator, discarding any pending updates and the current content.

    Declaration

    Swift

    func clear()

    Objective-C

    - (void)clear

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.