Mac Developer Library

Developer

QuartzCore Framework Reference CIFilter Class Reference

Options
Deployment Target:

On This Page
Language:

CIFilter

The CIFilter class produces a CIImage object as output. Typically, a filter takes one or more images as input. Some filters, however, generate an image based on other types of input parameters. The parameters of a CIFilter object are set and retrieved through the use of key-value pairs. More...

Inheritance


Conforms To


Import Statement


import QuartzCore @import QuartzCore;

Availability


Available in OS X v10.4 and later.
  • Creates a CIFilter object for a specific kind of filter.

    Declaration

    Swift

    init!(name name: String!) -> CIFilter

    Objective-C

    + (CIFilter *)filterWithName:(NSString *)name

    Parameters

    name

    The name of the filter. You must make sure the name is spelled correctly, otherwise your app will run but not produce any output images. For that reason, you should check for the existence of the filter after calling this method.

    Return Value

    A CIFilter object whose input values are undefined.

    Discussion

    You should call setDefaults after you call this method or set values individually by calling setValue:forKey.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Creates a CIFilter object for a specific kind of filter and initializes the input values.

    Declaration

    Objective-C

    + (CIFilter *)filterWithName:(NSString *)name keysAndValues:(id)key0, ...

    Parameters

    name

    The name of the filter. You must make sure the name is spelled correctly, otherwise your app will run but not produce any output images. For that reason, you should check for the existence of the filter after calling this method.

    key0,

    A list of key-value pairs to set as input values to the filter. Each key is a constant that specifies the name of the input value to set, and must be followed by a value. You signal the end of the list by passing a nil value.

    Return Value

    A CIFilter object whose input values are initialized.

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • Returns a CIFilter object initialized with RAW image data supplied to the method.

    Declaration

    Swift

    init!(imageData data: NSData!, options options: [NSObject : AnyObject]!) -> CIFilter

    Objective-C

    + (CIFilter *)filterWithImageData:(NSData *)data options:(NSDictionary *)options

    Parameters

    data

    The RAW image data to initialize the object with.

    options

    A options dictionary. You can pass any of the keys defined in “RAW Image Options” along with the appropriate value. You should provide a source type identifier hint key (kCGImageSourceTypeIdentifierHint) and the appropriate source type value to help the decoder determine the file type. Otherwise it’s possible to obtain incorrect results. See the Discussion for an example

    Return Value

    A CIFilter object.

    Discussion

    After calling this method, the CIFilter object returns a CIImage object that is properly processed similar to images retrieved using the outputImage key.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Returns a CIFilter object initialized with data from a RAW image file.

    Declaration

    Swift

    init!(imageURL url: NSURL!, options options: [NSObject : AnyObject]!) -> CIFilter

    Objective-C

    + (CIFilter *)filterWithImageURL:(NSURL *)url options:(NSDictionary *)options

    Parameters

    url

    The location of a RAW image file.

    options

    An options dictionary. You can pass any of the keys defined in “RAW Image Options”.

    Return Value

    A CIFilter object.

    Discussion

    After calling this method, the CIFilter object returns a CIImage object that is properly processed similar to images retrieved using the outputImage key.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Returns an array of all published filter names that match all the specified categories.

    Declaration

    Swift

    class func filterNamesInCategories(_ categories: [AnyObject]!) -> [AnyObject]!

    Objective-C

    + (NSArray *)filterNamesInCategories:(NSArray *)categories

    Parameters

    categories

    One or more of the filter category keys defined in Filter Category Keys. Pass nil to get all filters in all categories.

    Return Value

    An array that contains all published filter names that match all the categories specified by the categories argument.

    Discussion

    When you pass more than one filter category, this method returns the intersection of the filters in the categories. For example, if you pass the categories kCICategoryBuiltIn and kCICategoryColorAdjustment, you obtain all the filters that are members of both the built-in and color adjustment categories. But if you pass in kCICategoryGenerator and kCICategoryStylize, you will not get any filters returned to you because there are no filters that are members of both the generator and stylize categories. If you want to obtain all stylize and generator filters, you must call the filterNamesInCategories: method for each category separately and then merge the results.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns an array of all published filter names in the specified category.

    Declaration

    Swift

    class func filterNamesInCategory(_ category: String!) -> [AnyObject]!

    Objective-C

    + (NSArray *)filterNamesInCategory:(NSString *)category

    Parameters

    category

    A string object that specifies one of the filter categories defined in Filter Category Keys.

    Return Value

    An array that contains all published names of the filter in a category.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Publishes a custom filter that is not packaged as an image unit.

    Declaration

    Swift

    class func registerFilterName(_ name: String!, constructor anObject: CIFilterConstructor!, classAttributes attributes: [NSObject : AnyObject]!)

    Objective-C

    + (void)registerFilterName:(NSString *)name constructor:(id<CIFilterConstructor>)anObject classAttributes:(NSDictionary *)attributes

    Parameters

    name

    A string object that specifies the name of the filter you want to publish.

    anObject

    A constructor object that implements the filterWithName method.

    attributes

    A dictionary that contains the class display name and filter categories attributes along with the appropriate value for each attributes. That is, the kCIAttributeFilterDisplayName attribute and a string that specifies the display name, and the kCIAttributeFilterCategories and an array that specifies the categories to which the filter belongs (such as kCICategoryStillImage and kCICategoryDistortionEffect). All other attributes for the filter should be returned by the custom attributes method implement by the filter.

    Discussion

    In most cases you don’t need to use this method because the preferred way to register a custom filter that you write is to package it as an image unit. You do not need to use this method for a filter packaged as an image unit because you register your filter using the CIPlugInRegistration protocol. (See Core Image Programming Guide for additional details.)

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns a dictionary of key-value pairs that describe the filter.

    Declaration

    Swift

    func attributes() -> [NSObject : AnyObject]!

    Objective-C

    - (NSDictionary *)attributes

    Return Value

    A dictionary that contains a key for each input and output parameter for the filter. Each key is a dictionary that contains all the attributes of an input or output parameter.

    Discussion

    For example, the attributes dictionary for the CIColorControls filter contains the following information:

    • CIColorControls:
    • {
    • CIAttributeFilterCategories = (
    • CICategoryColorAdjustment,
    • CICategoryVideo,
    • CICategoryStillImage,
    • CICategoryInterlaced,
    • CICategoryNonSquarePixels,
    • CICategoryBuiltIn
    • );
    • CIAttributeFilterDisplayName = "Color Controls";
    • CIAttributeFilterName = CIColorControls;
    • inputBrightness = {
    • CIAttributeClass = NSNumber;
    • CIAttributeDefault = 0;
    • CIAttributeIdentity = 0;
    • CIAttributeMin = -1;
    • CIAttributeSliderMax = 1;
    • CIAttributeSliderMin = -1;
    • CIAttributeType = CIAttributeTypeScalar;
    • };
    • inputContrast = {
    • CIAttributeClass = NSNumber;
    • CIAttributeDefault = 1;
    • CIAttributeIdentity = 1;
    • CIAttributeMin = 0.25;
    • CIAttributeSliderMax = 4;
    • CIAttributeSliderMin = 0.25;
    • CIAttributeType = CIAttributeTypeScalar;
    • };
    • inputImage = {CIAttributeClass = CIImage; };
    • inputSaturation = {
    • CIAttributeClass = NSNumber;
    • CIAttributeDefault = 1;
    • CIAttributeIdentity = 1;
    • CIAttributeMin = 0;
    • CIAttributeSliderMax = 3;
    • CIAttributeSliderMin = 0;
    • CIAttributeType = CIAttributeTypeScalar;
    • };
    • outputImage = {CIAttributeClass = CIImage; };
    • }

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns an array that contains the names of the input parameters to the filter.

    Declaration

    Swift

    func inputKeys() -> [AnyObject]!

    Objective-C

    - (NSArray *)inputKeys

    Return Value

    An array that contains the names of all input parameters to the filter.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns an array that contains the names of the output parameters for the filter.

    Declaration

    Swift

    func outputKeys() -> [AnyObject]!

    Objective-C

    - (NSArray *)outputKeys

    Return Value

    An array that contains the names of all output parameters from the filter.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • The name of the filter.

    Declaration

    Swift

    var name: String!

    Objective-C

    @property(copy) NSString *name

    Return Value

    A string that holds the name of the filter.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Returns a CIImage object that encapsulates the operations configured in the filter. (read-only)

    Declaration

    Swift

    var outputImage: CIImage! { get }

    Objective-C

    @property(readonly, nonatomic) CIImage *outputImage

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.10 and later.

  • Sets all input values for a filter to default values.

    Declaration

    Swift

    func setDefaults()

    Objective-C

    - (void)setDefaults

    Discussion

    Input values whose default values are not defined are left unchanged.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Produces a CIImage object by applying arguments to a kernel function and using options to control how the kernel function is evaluated.

    Declaration

    Swift

    func apply(_ k: CIKernel!, arguments args: [AnyObject]!, options dict: [NSObject : AnyObject]!) -> CIImage!

    Objective-C

    - (CIImage *)apply:(CIKernel *)k arguments:(NSArray *)args options:(NSDictionary *)dict

    Parameters

    k

    A CIKernel object that contains a kernel function.

    args

    The arguments that are type compatible with the function signature of the kernel function.

    dict

    A dictionary that contains options (key-value pairs) to control how the kernel function is evaluated.

    Return Value

    The CIImage object produced by a filter.

    Discussion

    If you are implementing a custom filter, this method needs to be called from within the outputImage method in order to apply your kernel function to the CIImage object. You can pass any of the keys defined in “Options for Applying a Filter”, along with appropriate values, into the options dictionary.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

    See Also

    – apply:

  • Produces a CIImage object by applying a kernel function.

    Declaration

    Objective-C

    - (CIImage *)apply:(CIKernel *)k,

    Parameters

    k

    A CIKernel object that contains a kernel function.

    A list of arguments to supply to the kernel function. The supplied arguments must be type-compatible with the function signature of the kernel function. The list of arguments must be terminated by the nil object.

    Discussion

    If you are implementing a custom filter, this method needs to be called from within the outputImage method in order to apply your kernel function to the CIImage object. For example, if the kernel function has this signature:

    • kernel vec4 brightenEffect (sampler src, float k)

    You would supply two arguments after the k argument to the apply:k, .. method. In this case, the first argument must be a sampler and the second a floating-point value. For more information on kernels, see Core Image Kernel Language Reference.

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • Returns the localized name for the specified filter name.

    Declaration

    Swift

    class func localizedNameForFilterName(_ filterName: String!) -> String!

    Objective-C

    + (NSString *)localizedNameForFilterName:(NSString *)filterName

    Parameters

    filterName

    A filter name.

    Return Value

    The localized name for the filter.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns the localized name for the specified filter category.

    Declaration

    Swift

    class func localizedNameForCategory(_ category: String!) -> String!

    Objective-C

    + (NSString *)localizedNameForCategory:(NSString *)category

    Parameters

    category

    A filter category.

    Return Value

    The localized name for the filter category.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.4 and later.

  • Returns the localized description of a filter for display in the user interface.

    Declaration

    Swift

    class func localizedDescriptionForFilterName(_ filterName: String!) -> String!

    Objective-C

    + (NSString *)localizedDescriptionForFilterName:(NSString *)filterName

    Parameters

    filterName

    The filter name.

    Return Value

    The localized description of the filter.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Returns the location of the localized reference documentation that describes the filter.

    Declaration

    Swift

    class func localizedReferenceDocumentationForFilterName(_ filterName: String!) -> NSURL!

    Objective-C

    + (NSURL *)localizedReferenceDocumentationForFilterName:(NSString *)filterName

    Parameters

    filterName

    The filter name.

    Return Value

    A URL that specifies the location of the localized documentation, or nil if the filter does not provide localized reference documentation.

    Discussion

    The URL can be a local file or a remote document on a web server. Because filters created prior to OS X v10.5 could return nil, you should be make sure that your code handles this case gracefully.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • name name Property

    A name associated with a filter.

    Declaration

    Swift

    var name: String!

    Objective-C

    @property(copy) NSString *name

    Discussion

    You use a filter’s name to construct key paths to its attributes when the filter is attached to a Core Animation layer. For example, if a CALayer object has an attached CIFilter instance whose name is myExposureFilter, you can refer to attributes of the filter using a key path such as filters.myExposureFilter.inputEV. Layer animations may also access filter attributes via these key paths.

    The default value for this property is nil.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • enabled enabled Property

    A Boolean value that determines whether the filter is enabled. Animatable.

    Declaration

    Swift

    var enabled: Bool

    Objective-C

    @property(getter=isEnabled) BOOL enabled

    Discussion

    The filter is applied to its input when this property is set to YEStrue (the default).

    Use this property in conjunction with the name property when attaching filters to Core Animation layers and accessing or animating filter properties through key-value animations.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.5 and later.

  • Returns a filter view for the filter.

    Declaration

    Swift

    func viewForUIConfiguration(_ inUIConfiguration: [NSObject : AnyObject]!, excludedKeys inKeys: [AnyObject]!) -> IKFilterUIView!

    Objective-C

    - (IKFilterUIView *)viewForUIConfiguration:(NSDictionary *)inUIConfiguration excludedKeys:(NSArray *)inKeys

    Parameters

    inUIConfiguration

    A dictionary that contains values for the IKUISizeFlavor and kCIUIParameterSet keys. For allowed values for the IKUISizeFlavor key, see User Interface Options. For allowed values for the kCIUIParameterSet key, see User Interface Control Options.

    inKeys

    An array of the input keys for which you do not want to provide a user interface. Pass nil if you want all input keys to be represented in the user interface.

    Return Value

    An IKFilterUIView object.

    Discussion

    Calling this method to receive a view for a filter causes the CIFilter class to invoke the provideViewForUIConfiguration:excludedKeys: method. If you override provideViewForUIConfiguration:excludedKeys: the user interface is created by your filter subclass. Otherwise, Core Image automatically generates the user interface based on the filter keys and attributes.

    Your app can retrieve a view whose control sizes complement the size of user interface elements already used in the application. It is also possible to choose which filter input parameters appear in the view. Consumer applications, for example, may want to show a small, basic set of input parameters whereas professional applications may want to provide access to all input parameters.

    When you request a user interface for a parameter set, all keys for that set and below are included. For example, the advanced set consists of all parameters in the basic, intermediate and advanced sets. The development set should contain parameters that are either experimental or for debugging purposes. You should use them only during the development of filters and client applications, and not in a shipping product.

    The controls in the view use bindings to set the values of the filter. See Cocoa Bindings Programming Topics if you are unfamiliar with bindings.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Serializes filter parameters into XMP form that is suitable for embedding in an image.

    Declaration

    Swift

    class func serializedXMPFromFilters(_ filters: [AnyObject]!, inputImageExtent extent: CGRect) -> NSData!

    Objective-C

    + (NSData *)serializedXMPFromFilters:(NSArray *)filters inputImageExtent:(CGRect)extent

    Parameters

    filters

    The array of filters to serialize. See Discussion for the filters that can be serialized.

    extent

    The extent of the input image to the filter.

    Discussion

    At this time the only filters classes that can be serialized using this method are, CIAffineTransform, CICrop, and the filters returned by the CIImage methods autoAdjustmentFilters and autoAdjustmentFiltersWithOptions:. The parameters of other filter classes will not be serialized.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • Returns an array of filter objects de-serialized from XMP data.

    Declaration

    Swift

    class func filterArrayFromSerializedXMP(_ xmpData: NSData!, inputImageExtent extent: CGRect, error outError: NSErrorPointer) -> [AnyObject]!

    Objective-C

    + (NSArray *)filterArrayFromSerializedXMP:(NSData *)xmpData inputImageExtent:(CGRect)extent error:(NSError **)outError

    Parameters

    xmpData

    The XMP data created previously by calling serializedXMPFromFilters:inputImageExtent:.

    extent

    The extent of the image from which the XMP data was extracted.

    outError

    The address of an NSError object for receiving errors, otherwise nil.

    Import Statement

    import QuartzCore

    Availability

    Available in OS X v10.9 and later.

  • Attributes for a filter and its parameters.

    Declaration

    Swift

    var kCIAttributeFilterName: NSString! var kCIAttributeFilterDisplayName: NSString! var kCIAttributeDescription: NSString! var kCIAttributeReferenceDocumentation: NSString! var kCIAttributeFilterCategories: NSString! var kCIAttributeClass: NSString! var kCIAttributeType: NSString! var kCIAttributeMin: NSString! var kCIAttributeMax: NSString! var kCIAttributeSliderMin: NSString! var kCIAttributeSliderMax: NSString! var kCIAttributeDefault: NSString! var kCIAttributeIdentity: NSString! var kCIAttributeName: NSString! var kCIAttributeDisplayName: NSString!

    Objective-C

    extern NSString *kCIAttributeFilterName; extern NSString *kCIAttributeFilterDisplayName; extern NSString *kCIAttributeDescription; extern NSString *kCIAttributeReferenceDocumentation; extern NSString *kCIAttributeFilterCategories; extern NSString *kCIAttributeClass; extern NSString *kCIAttributeType; extern NSString *kCIAttributeMin; extern NSString *kCIAttributeMax; extern NSString *kCIAttributeSliderMin; extern NSString *kCIAttributeSliderMax; extern NSString *kCIAttributeDefault; extern NSString *kCIAttributeIdentity; extern NSString *kCIAttributeName; extern NSString *kCIAttributeDisplayName;

    Constants

    • kCIAttributeFilterName

      kCIAttributeFilterName

      The filter name, specified as an NSString object.

      Available in OS X v10.4 and later.

    • kCIAttributeFilterDisplayName

      kCIAttributeFilterDisplayName

      The localized version of the filter name that is displayed in the user interface.

      Available in OS X v10.4 and later.

    • kCIAttributeDescription

      kCIAttributeDescription

      The localized description of the filter. This description should inform the end user what the filter does and be short enough to display in the user interface for the filter. It is not intended to be technically detailed.

      Available in OS X v10.5 and later.

    • kCIAttributeReferenceDocumentation

      kCIAttributeReferenceDocumentation

      The localized reference documentation for the filter. The reference should provide developers with technical details.

      Available in OS X v10.5 and later.

    • kCIAttributeFilterCategories

      kCIAttributeFilterCategories

      An array of filter category keys that specifies all the categories in which the filter is a member.

      Available in OS X v10.4 and later.

    • kCIAttributeClass

      kCIAttributeClass

      The class name of the filter.

      Available in OS X v10.4 and later.

    • kCIAttributeType

      kCIAttributeType

      One of the attribute types described in Data Type Attributes.

      Available in OS X v10.4 and later.

    • kCIAttributeMin

      kCIAttributeMin

      The minimum value for a filter parameter, specified as a floating-point value.

      Available in OS X v10.4 and later.

    • kCIAttributeMax

      kCIAttributeMax

      The maximum value for a filter parameter, specified as a floating-point value.

      Available in OS X v10.4 and later.

    • kCIAttributeSliderMin

      kCIAttributeSliderMin

      The minimum value, specified as a floating-point value, to use for a slider that controls input values for a filter parameter.

      Available in OS X v10.4 and later.

    • kCIAttributeSliderMax

      kCIAttributeSliderMax

      The maximum value, specified as a floating-point value, to use for a slider that controls input values for a filter parameter.

      Available in OS X v10.4 and later.

    • kCIAttributeDefault

      kCIAttributeDefault

      The default value, specified as a floating-point value, for a filter parameter.

      Available in OS X v10.4 and later.

    • kCIAttributeIdentity

      kCIAttributeIdentity

      If supplied as a value for a parameter, the parameter has no effect on the input image.

      Available in OS X v10.4 and later.

    • kCIAttributeName

      kCIAttributeName

      The name of the attribute.

      Available in OS X v10.4 and later.

    • kCIAttributeDisplayName

      kCIAttributeDisplayName

      The localized display name of the attribute.

      Available in OS X v10.4 and later.

    Discussion

    Attribute keys are used for the attribute dictionary of a filter. Most entries in the attribute dictionary are optional. The attribute kCIAttributeFilterName is mandatory. For a parameter, the attribute kCIAttributeClass is mandatory because it specifies the class name of the filter.

    A parameter of type NSNumber does not necessarily need the attributes kCIAttributeMin and kCIAttributeMax. These attributes are not present when the parameter has no upper or lower bounds. For example, the Gaussian blur filter has a radius parameter with a minimum of 0 but no maximum value to indicate that all nonnegative values are valid.

    Import Statement

  • Numeric data types.

    Declaration

    Swift

    var kCIAttributeTypeTime: NSString! var kCIAttributeTypeScalar: NSString! var kCIAttributeTypeDistance: NSString! var kCIAttributeTypeAngle: NSString! var kCIAttributeTypeBoolean: NSString! var kCIAttributeTypeInteger: NSString! var kCIAttributeTypeCount: NSString!

    Objective-C

    extern NSString *kCIAttributeTypeTime; extern NSString *kCIAttributeTypeScalar; extern NSString *kCIAttributeTypeDistance; extern NSString *kCIAttributeTypeAngle; extern NSString *kCIAttributeTypeBoolean; extern NSString *kCIAttributeTypeInteger; extern NSString *kCIAttributeTypeCount;

    Constants

    • kCIAttributeTypeTime

      kCIAttributeTypeTime

      A parametric time for transitions, specified as a floating-point value in the range of 0.0 to 1.0.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeScalar

      kCIAttributeTypeScalar

      A scalar value.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeDistance

      kCIAttributeTypeDistance

      A distance.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeAngle

      kCIAttributeTypeAngle

      An angle.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeBoolean

      kCIAttributeTypeBoolean

      A Boolean value.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeInteger

      kCIAttributeTypeInteger

      An integer value.

      Available in OS X v10.5 and later.

    • kCIAttributeTypeCount

      kCIAttributeTypeCount

      A positive integer value.

      Available in OS X v10.5 and later.

    Import Statement

  • Vector data types.

    Declaration

    Swift

    var kCIAttributeTypePosition: NSString! var kCIAttributeTypeOffset: NSString! var kCIAttributeTypePosition3: NSString! var kCIAttributeTypeRectangle: NSString!

    Objective-C

    extern NSString *kCIAttributeTypePosition; extern NSString *kCIAttributeTypeOffset; extern NSString *kCIAttributeTypePosition3; extern NSString *kCIAttributeTypeRectangle

    Constants

    • kCIAttributeTypePosition

      kCIAttributeTypePosition

      A two-dimensional location in the working coordinate space. (A 2-element vector type.)

      Available in OS X v10.4 and later.

    • kCIAttributeTypeOffset

      kCIAttributeTypeOffset

      An offset. (A 2-element vector type.)

      Available in OS X v10.4 and later.

    • kCIAttributeTypePosition3

      kCIAttributeTypePosition3

      A three-dimensional location in the working coordinate space. (A 3-element vector type.)

      Available in OS X v10.4 and later.

    • kCIAttributeTypeRectangle

      kCIAttributeTypeRectangle

      A Core Image vector that specifies the x and y values of the rectangle origin, and the width (w) and height (h) of the rectangle. The vector takes the form [x, y, w, h]. (A 4-element vector type.)

      Available in OS X v10.4 and later.

    Import Statement

  • Color types.

    Declaration

    Swift

    var kCIAttributeTypeOpaqueColor: NSString! var kCIAttributeTypeGradient: NSString!

    Objective-C

    extern NSString *kCIAttributeTypeOpaqueColor; extern NSString *kCIAttributeTypeGradient;

    Constants

    • kCIAttributeTypeOpaqueColor

      kCIAttributeTypeOpaqueColor

      A Core Image color (CIColor object) that specifies red, green, and blue component values. Use this key for colors with no alpha component. If the key is not present, Core Image assumes color with alpha.

      Available in OS X v10.4 and later.

    • kCIAttributeTypeGradient

      kCIAttributeTypeGradient

      An n-by-1 gradient image used to describe a color ramp.

      Available in OS X v10.4 and later.

    Import Statement

  • Categories of filters.

    Declaration

    Swift

    var kCICategoryDistortionEffect: NSString! var kCICategoryGeometryAdjustment: NSString! var kCICategoryCompositeOperation: NSString! var kCICategoryHalftoneEffect: NSString! var kCICategoryColorAdjustment: NSString! var kCICategoryColorEffect: NSString! var kCICategoryTransition: NSString! var kCICategoryTileEffect: NSString! var kCICategoryGenerator: NSString! var kCICategoryReduction: NSString! var kCICategoryGradient: NSString! var kCICategoryStylize: NSString! var kCICategorySharpen: NSString! var kCICategoryBlur: NSString! var kCICategoryVideo: NSString! var kCICategoryStillImage: NSString! var kCICategoryInterlaced: NSString! var kCICategoryNonSquarePixels: NSString! var kCICategoryHighDynamicRange: NSString! var kCICategoryBuiltIn: NSString! var kCICategoryFilterGenerator: NSString!

    Objective-C

    extern NSString *kCICategoryDistortionEffect; extern NSString *kCICategoryGeometryAdjustment; extern NSString *kCICategoryCompositeOperation; extern NSString *kCICategoryHalftoneEffect; extern NSString *kCICategoryColorAdjustment; extern NSString *kCICategoryColorEffect; extern NSString *kCICategoryTransition; extern NSString *kCICategoryTileEffect; extern NSString *kCICategoryGenerator; extern NSString *kCICategoryReduction; extern NSString *kCICategoryGradient; extern NSString *kCICategoryStylize; extern NSString *kCICategorySharpen; extern NSString *kCICategoryBlur; extern NSString *kCICategoryVideo; extern NSString *kCICategoryStillImage; extern NSString *kCICategoryInterlaced; extern NSString *kCICategoryNonSquarePixels; extern NSString *kCICategoryHighDynamicRange ; extern NSString *kCICategoryBuiltIn; extern NSString *kCICategoryFilterGenerator;

    Constants

    • kCICategoryDistortionEffect

      kCICategoryDistortionEffect

      A filter that reshapes an image by altering its geometry to create a 3D effect. Using distortion filters, you can displace portions of an image, apply lens effects, make a bulge in an image, and perform other operation to achieve an artistic effect.

      Available in OS X v10.4 and later.

    • kCICategoryGeometryAdjustment

      kCICategoryGeometryAdjustment

      A filter that changes the geometry of an image. Some of these filters are used to warp an image to achieve an artistic effects, but these filters can also be used to correct problems in the source image. For example, you can apply an affine transform to straighten an image that is rotated with respect to the horizon.

      Available in OS X v10.4 and later.

    • kCICategoryCompositeOperation

      kCICategoryCompositeOperation

      A filter operates on two image sources, using the color values of one image to operate on the other. Composite filters perform computations such as computing maximum values, minimum values, and multiplying values between input images. You can use compositing filters to add effects to an image, crop an image, and achieve a variety of other effects.

      Available in OS X v10.4 and later.

    • kCICategoryHalftoneEffect

      kCICategoryHalftoneEffect

      A filter that simulates a variety of halftone screens, to mimic the halftone process used in print media. The output of these filters has the familiar “newspaper” look of the various dot patterns. Filters are typically named after the pattern created by the virtual halftone screen, such as circular screen or hatched screen.

      Available in OS X v10.4 and later.

    • kCICategoryColorAdjustment

      kCICategoryColorAdjustment

      A filter that changes color values. Color adjustment filters are used to eliminate color casts, adjust hue, and correct brightness and contrast. Color adjustment filters do not perform color management; ColorSync performs color management. You can use Quartz 2D to specify the color space associated with an image. For more information, see Color Management Overview and Quartz 2D Programming Guide.

      Available in OS X v10.4 and later.

    • kCICategoryColorEffect

      kCICategoryColorEffect

      A filter that modifies the color of an image to achieve an artistic effect. Examples of color effect filters include filters that change a color image to a sepia image or a monochrome image or that produces such effects as posterizing.

      Available in OS X v10.4 and later.

    • kCICategoryTransition

      kCICategoryTransition

      A filter that provides a bridge between two or more images by applying a motion effect that defines how the pixels of a source image yield to that of the destination image.

      Available in OS X v10.4 and later.

    • kCICategoryTileEffect

      kCICategoryTileEffect

      A filter that typically applies an effect to an image and then create smaller versions of the image (tiles), which are then laid out to create a pattern that’s infinite in extent.

      Available in OS X v10.4 and later.

    • kCICategoryGenerator

      kCICategoryGenerator

      A filter that generates a pattern, such as a solid color, a checkerboard, or a star shine. The generated output is typically used as input to another filter.

      Available in OS X v10.4 and later.

    • kCICategoryReduction

      kCICategoryReduction

      A filter that reduces image data. These filters are used to solve image analysis problems.

      Available in OS X v10.5 and later.

    • kCICategoryGradient

      kCICategoryGradient

      A filter that generates a fill whose color varies smoothly. Exactly how color varies depends on the type of gradient—linear, radial, or Gaussian.

      Available in OS X v10.4 and later.

    • kCICategoryStylize

      kCICategoryStylize

      A filter that makes a photographic image look as if it was painted or sketched. These filters are typically used alone or in combination with other filters to achieve artistic effects.

      Available in OS X v10.4 and later.

    • kCICategorySharpen

      kCICategorySharpen

      A filter that sharpens images, increasing the contrast between the edges in an image. Examples of sharpen filters are unsharp mask and sharpen luminance.

      Available in OS X v10.4 and later.

    • kCICategoryBlur

      kCICategoryBlur

      A filter that softens images, decreasing the contrast between the edges in an image. Examples of blur filters are Gaussian blur and zoom blur.

      Available in OS X v10.4 and later.

    • kCICategoryVideo

      kCICategoryVideo

      A filter that works on video images.

      Available in OS X v10.4 and later.

    • kCICategoryStillImage

      kCICategoryStillImage

      A filter that works on still images.

      Available in OS X v10.4 and later.

    • kCICategoryInterlaced

      kCICategoryInterlaced

      A filter that works on interlaced images.

      Available in OS X v10.4 and later.

    • kCICategoryNonSquarePixels

      kCICategoryNonSquarePixels

      A filter that works on non-square pixels.

      Available in OS X v10.4 and later.

    • kCICategoryHighDynamicRange

      kCICategoryHighDynamicRange

      A filter that works on high dynamic range pixels.

      Available in OS X v10.4 and later.

    • kCICategoryBuiltIn

      kCICategoryBuiltIn

      A filter provided by Core Image. This distinguishes built-in filters from plug-in filters.

      Available in OS X v10.4 and later.

    • kCICategoryFilterGenerator

      kCICategoryFilterGenerator

      A filter created by chaining several filters together and then packaged as a CIFilterGenerator object.

      Available in OS X v10.5 and later.

    Import Statement

  • Options that control the application of a custom Core Image filter.

    Declaration

    Swift

    var kCIApplyOptionExtent: NSString! var kCIApplyOptionDefinition: NSString! var kCIApplyOptionUserInfo: NSString! var kCIApplyOptionColorSpace: NSString!

    Objective-C

    extern NSString *kCIApplyOptionExtent; extern NSString *kCIApplyOptionDefinition; extern NSString *kCIApplyOptionUserInfo; extern NSString *kCIApplyOptionColorSpace;

    Constants

    • kCIApplyOptionExtent

      kCIApplyOptionExtent

      The size of the produced image. The associated value is a four-element array (NSArray) that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

      Available in OS X v10.4 and later.

    • kCIApplyOptionDefinition

      kCIApplyOptionDefinition

      The domain of definition (DOD) of the produced image. The associated value is either a Core Image filter shape or a four-element array (NSArray) that specifies a rectangle.

      Available in OS X v10.4 and later.

    • kCIApplyOptionUserInfo

      kCIApplyOptionUserInfo

      Information needed by a callback. The associated value is an object that Core Image will pass to any callbacks invoked for that filter.

      Available in OS X v10.4 and later.

    • kCIApplyOptionColorSpace

      kCIApplyOptionColorSpace

      The color space of the produced image. The associated value must be an RGB CGColorSpaceRef object. If not specified, the output of the kernel is in the working color space of the Core Image context used to render the image.

      Available in OS X v10.4 and later.

    Discussion

    Use these constants only when creating a custom filter for which you are writing the kernel. For more information, see Core Image Programming Guide. The example on creating a custom filter shows how to use these options.

    Import Statement

  • Sets of controls for various user scenarios.

    Declaration

    Swift

    var kCIUIParameterSet: NSString! var kCIUISetBasic: NSString! var kCIUISetIntermediate: NSString! var kCIUISetAdvanced: NSString! var kCIUISetDevelopment: NSString!

    Objective-C

    extern NSString *kCIUIParameterSet; extern NSString *kCIUISetBasic; extern NSString *kCIUISetIntermediate; extern NSString *kCIUISetAdvanced; extern NSString *kCIUISetDevelopment;

    Constants

    • kCIUIParameterSet

      kCIUIParameterSet

      The set of input parameters to use. The associated value can be kCIUISetBasic, kCIUISetIntermediate, kCIUISetAdvanced, or kCIUISetDevelopment.

      Available in OS X v10.5 and later.

    • kCIUISetBasic

      kCIUISetBasic

      Controls that are appropriate for a basic user scenario, that is, the minimum of settings to control the filter.

      Available in OS X v10.5 and later.

    • kCIUISetIntermediate

      kCIUISetIntermediate

      Controls that are appropriate for an intermediate user scenario.

      Available in OS X v10.5 and later.

    • kCIUISetAdvanced

      kCIUISetAdvanced

      Controls that are appropriate for an advanced user scenario.

      Available in OS X v10.5 and later.

    • kCIUISetDevelopment

      kCIUISetDevelopment

      Controls that should be visible only for development purposes.

      Available in OS X v10.5 and later.

    Discussion

    You can use these constants to specify the controls that you want associated with each user scenario. For example, for a filter that has many input parameters you can choose a small set of input parameters that the typical consumer can control and set the other input parameters to default values. For the same filter, however, you can choose to allow professional customers to control all the input parameters.

    Import Statement

  • Keys or values for the size of the input parameter controls for a filter view.

    Declaration

    Swift

    var IKUISizeFlavor: NSString! var IKUISizeMini: NSString! var IKUISizeSmall: NSString! var IKUISizeRegular: NSString! var IKUImaxSize: NSString! var IKUIFlavorAllowFallback: NSString!

    Objective-C

    NSString *IKUISizeFlavor; NSString *IKUISizeMini; NSString *IKUISizeSmall; NSString *IKUISizeRegular; NSString *IKUImaxSize; NSString *IKUIFlavorAllowFallback;

    Constants

    • IKUISizeFlavor

      IKUISizeFlavor

      A key for the size of the controls in a filter view. The associated value can be IKUISizeMini, IKUISizeSmall, or IKUISizeRegular.

      Available in OS X v10.5 and later.

    • IKUISizeMini

      IKUISizeMini

      Controls whose size is NSMiniControlSize.

      Available in OS X v10.5 and later.

    • IKUISizeSmall

      IKUISizeSmall

      Controls whose size is NSSmallControlSize.

      Available in OS X v10.5 and later.

    • IKUISizeRegular

      IKUISizeRegular

      Controls whose size is NSRegularControlSize.

      Available in OS X v10.5 and later.

    • IKUImaxSize

      IKUImaxSize

      Controls whose dimensions are the maximum allowable for the filter view. A width or height of 0 indicates that that dimension of the view is not restricted. If the size requested is too small, the filter is expected to return a view as small as possible. It is up to the client to verify that the returned view fits into the context.

      Available in OS X v10.5 and later.

    • IKUIFlavorAllowFallback

      IKUIFlavorAllowFallback

      Substitute controls of another size. The associated value is a Boolean value. If the filter cannot provide a view for the requested size and a fallback is allowed, the filter can use controls of a different size.

      Available in OS X v10.5 and later.

    Import Statement

  • Keys for input parameters to filters.

    Declaration

    Swift

    var kCIOutputImageKey: NSString! var kCIInputBackgroundImageKey: NSString! var kCIInputImageKey: NSString! var kCIInputTimeKey: NSString! var kCIInputTransformKey: NSString! var kCIInputScaleKey: NSString! var kCIInputAspectRatioKey: NSString! var kCIInputCenterKey: NSString! var kCIInputRadiusKey: NSString! var kCIInputAngleKey: NSString! var kCIInputRefractionKey: NSString! var kCIInputWidthKey: NSString! var kCIInputSharpnessKey: NSString! var kCIInputIntensityKey: NSString! var kCIInputEVKey: NSString! var kCIInputSaturationKey: NSString! var kCIInputColorKey: NSString! var kCIInputBrightnessKey: NSString! var kCIInputContrastKey: NSString! var kCIInputGradientImageKey: NSString! var kCIInputMaskImageKey: NSString! var kCIInputShadingImageKey: NSString! var kCIInputTargetImageKey: NSString! var kCIInputExtentKey: NSString!

    Objective-C

    extern NSString *kCIOutputImageKey; extern NSString *kCIInputBackgroundImageKey; extern NSString *kCIInputImageKey; extern NSString *kCIInputTimeKey; extern NSString *kCIInputTransformKey; extern NSString *kCIInputScaleKey; extern NSString *kCIInputAspectRatioKey; extern NSString *kCIInputCenterKey; extern NSString *kCIInputRadiusKey; extern NSString *kCIInputAngleKey; extern NSString *kCIInputRefractionKey; extern NSString *kCIInputWidthKey; extern NSString *kCIInputSharpnessKey; extern NSString *kCIInputIntensityKey; extern NSString *kCIInputEVKey; extern NSString *kCIInputSaturationKey; extern NSString *kCIInputColorKey; extern NSString *kCIInputBrightnessKey; extern NSString *kCIInputContrastKey; extern NSString *kCIInputGradientImageKey; extern NSString *kCIInputMaskImageKey; extern NSString *kCIInputShadingImageKey; extern NSString *kCIInputTargetImageKey; extern NSString *kCIInputExtentKey;

    Constants

    • kCIOutputImageKey

      kCIOutputImageKey

      A key for the CIImage object produced by a filter.

      Available in OS X v10.5 and later. Available in iOS 5.0 and later.

    • kCIInputBackgroundImageKey

      kCIInputBackgroundImageKey

      A key for the CIImage object to use as a background image.

      Available in OS X v10.5 and later. Available in iOS 5.0 and later.

    • kCIInputImageKey

      kCIInputImageKey

      A key for the CIImage object to use as an input image. For filters that also use a background image, this key refers to the foreground image.

      Available in OS X v10.5 and later. Available in iOS 5.0 and later.

    • kCIInputTimeKey

      kCIInputTimeKey

      A key for z scalar value (NSNumber) that specifies a time.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputTransformKey

      kCIInputTransformKey

      A key for an NSAffineTransform object that specifies a transformation to apply.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputScaleKey

      kCIInputScaleKey

      A key for a scalar value (NSNumber) that specifies the amount of the effect.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputAspectRatioKey

      kCIInputAspectRatioKey

      A key for a scalar value (NSNumber) that specifies a ratio.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputCenterKey

      kCIInputCenterKey

      A key for a CIVector object that specifies the center of the area, as x and y- coordinates, to be filtered.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputRadiusKey

      kCIInputRadiusKey

      A key for a scalar value (NSNumber) that specifies that specifies the distance from the center of an effect.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputAngleKey

      kCIInputAngleKey

      A key for a scalar value (NSNumber) that specifies an angle.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputRefractionKey

      kCIInputRefractionKey

      A key for a scalar value (NSNumber) that specifies the index of refraction of the material (such as glass) used in the effect.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputWidthKey

      kCIInputWidthKey

      A key for a scalar value (NSNumber) that specifies the width of the effect.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputSharpnessKey

      kCIInputSharpnessKey

      A key for a scalar value (NSNumber) that specifies the amount of sharpening to apply.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputIntensityKey

      kCIInputIntensityKey

      A key for a scalar value (NSNumber) that specifies an intensity value.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputEVKey

      kCIInputEVKey

      A key for a scalar value (NSNumber) that specifies how many F-stops brighter or darker the image should be.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputSaturationKey

      kCIInputSaturationKey

      A key for a scalar value (NSNumber) that specifies the amount to adjust the saturation.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputColorKey

      kCIInputColorKey

      A key for a CIColor object that specifies a color value.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputBrightnessKey

      kCIInputBrightnessKey

      A key for a scalar value (NSNumber) that specifies a brightness level.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputContrastKey

      kCIInputContrastKey

      A key for a scalar value (NSNumber) that specifies a contrast level.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputGradientImageKey

      kCIInputGradientImageKey

      A key for a CIImage object that specifies an environment map with alpha. Typically, this image contains highlight and shadow.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputMaskImageKey

      kCIInputMaskImageKey

      A key for a CIImage object to use as a mask.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputShadingImageKey

      kCIInputShadingImageKey

      A key for a CIImage object that specifies an environment map with alpha values. Typically this image contains highlight and shadow.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputTargetImageKey

      kCIInputTargetImageKey

      A key for a CIImage object that is the target image for a transition.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIInputExtentKey

      kCIInputExtentKey

      A key for a CIVector object that specifies a rectangle that defines the extent of the effect.

      Available in OS X v10.5 and later. Not available in iOS.

    Discussion

    These keys represent some of the most commonly used input parameters. A filter can use other kinds of input parameters.

    Import Statement

  • Options for creating a CIFilter object from RAW image data.

    Declaration

    Swift

    let kCIInputDecoderVersionKey: NSString! let kCISupportedDecoderVersionsKey: NSString! let kCIInputBoostKey: NSString! let kCIInputNeutralChromaticityXKey: NSString! let kCIInputNeutralChromaticityYKey: NSString! let kCIInputNeutralTemperatureKey: NSString! let kCIInputNeutralTintKey: NSString! let kCIInputNeutralLocationKey: NSString! let kCIInputScaleFactorKey: NSString! let kCIInputAllowDraftModeKey: NSString! let kCIInputIgnoreImageOrientationKey: NSString! let kCIInputImageOrientationKey: NSString! let kCIInputEnableSharpeningKey: NSString! let kCIInputEnableChromaticNoiseTrackingKey: NSString! let kCIInputNoiseReductionAmountKey: NSString! let kCIInputBoostShadowAmountKey: NSString! let kCIInputBiasKey: NSString! let kCIInputLinearSpaceFilter: NSString! let kCIOutputNativeSizeKey: NSString! let kCIActiveKeys: NSString!

    Objective-C

    extern NSString * const kCIInputDecoderVersionKey; extern NSString * const kCISupportedDecoderVersionsKey; extern NSString * const kCIInputBoostKey; extern NSString * const kCIInputNeutralChromaticityXKey; extern NSString * const kCIInputNeutralChromaticityYKey; extern NSString * const kCIInputNeutralTemperatureKey; extern NSString * const kCIInputNeutralTintKey; extern NSString * const kCIInputNeutralLocation; extern NSString * const kCIInputScaleFactorKey; extern NSString * const kCIInputAllowDraftModeKey; extern NSString * const kCIInputIgnoreImageOrientationKey; extern NSString * const kCIInputImageOrientationKey; extern NSString * const kCIInputEnableSharpeningKey; extern NSString * const kCIInputEnableChromaticNoiseTrackingKey; extern NSString * const kCIInputNoiseReductionAmountKey; extern NSString * const kCIInputBoostShadowAmountKey; extern NSString * const kCIInputBiasKey; extern NSString * const kCIInputLinearSpaceFilter; extern NSString * const kCIOutputNativeSizeKey; extern NSString * const kCIActiveKeys;

    Constants

    • kCIInputDecoderVersionKey

      kCIInputDecoderVersionKey

      A key for the version number of the method to be used for decoding. A newly initialized object defaults to the newest available decoder version for the given image type. You can request an alternative, older version to maintain compatibility with older releases. Must be one of the values listed for the kCISupportedDecoderVersionsKey key, otherwise a nil output image is generated. The associated value must be an NSNumber object that specifies an integer value in range of 0 to the current decoder version. When you request a specific version of the decoder, Core Image produces an image that is visually the same across different versions of the operating system. Core Image, however, does not guarantee that the same bits are produced across different versions of the operating system. That’s because the rounding behavior of floating-point arithmetic can vary due to differences in compilers or hardware. Note that this option has no effect if the image used for initialization is not RAW.

      Available in OS X v10.5 and later.

    • kCISupportedDecoderVersionsKey

      kCISupportedDecoderVersionsKey

      A key for the supported decoder versions. The associated value is an NSArray object that contains all supported decoder versions for the given image type, sorted in increasingly newer order. Each entry is an NSDictionary object that contains key-value pairs. All entries represent a valid version identifier that can be passed as the kCIDecoderVersion value for the key kCIDecoderMethodKey. Version values are read-only; attempting to set this value raises an exception. Currently, the only defined key is @"version" which has as its value an NSString that uniquely describing a given decoder version. This string might not be suitable for user interface display..

      Available in OS X v10.5 and later.

    • kCIInputBoostKey

      kCIInputBoostKey

      A key for the the amount of boost to apply to an image. The associated value is a floating-point value packaged as an NSNumber object. The value must be in the range of 0...1. A value of 0 indicates no boost, that is, a linear response. The default value is 1, which indicates full boost.

      Available in OS X v10.5 and later.

    • kCIInputNeutralChromaticityXKey

      kCIInputNeutralChromaticityXKey

      The x value of the chromaticity. The associated value is a floating-point value packaged as an NSNumber object. You can query this value to get the current x value for neutral x, y.

      Available in OS X v10.5 and later.

    • kCIInputNeutralChromaticityYKey

      kCIInputNeutralChromaticityYKey

      The y value of the chromaticity. The associated value is a floating-point value packaged as an NSNumber object. You can query this value to get the current y value for neutral x, y.

      Available in OS X v10.5 and later.

    • kCIInputNeutralTemperatureKey

      kCIInputNeutralTemperatureKey

      A key for neutral temperature. The associated value is a floating-point value packaged as an NSNumber object. You can query this value to get the current temperature value.

      Available in OS X v10.5 and later.

    • kCIInputNeutralTintKey

      kCIInputNeutralTintKey

      A key for the neutral tint. The associated value is a floating-point value packaged as an NSNumber object. Use this key to set or fetch the temperature and tint values. You can query this value to get the current tint value.

      Available in OS X v10.5 and later.

    • kCIInputNeutralLocationKey

      kCIInputNeutralLocationKey

      A key for the neutral position. Use this key to set the location in geometric coordinates of the unrotated output image that should be used as neutral. You cannot query this value; it is undefined for reading. The associated value is a two-element CIVector object that specifies the location (x, y).

      Available in OS X v10.5 and later.

    • kCIInputScaleFactorKey

      kCIInputScaleFactorKey

      A key for the scale factor. The associated value is a floating-point value packaged as an NSNumber object that specifies the desired scale factor at which the image will be drawn. Setting this value can greatly improve the drawing performance. A value of 1 is the identity. In some cases, if you change the scale factor and enable draft mode, performance can decrease. See kCIInputAllowDraftModeKey.

      Available in OS X v10.5 and later.

    • kCIInputAllowDraftModeKey

      kCIInputAllowDraftModeKey

      A key for allowing draft mode. The associated value is a Boolean value packaged as an NSNumber object. It’s best not to use draft mode if the image needs to be drawn without draft mode at a later time, because changing the value from YEStrue to NOfalse is an expensive operation. If the optional scale factor is smaller than a certain value, additionally setting draft mode can improve image decoding speed without any perceivable loss of quality. However, turning on draft mode does not have any effect if the scale factor is not below this threshold.

      Available in OS X v10.5 and later.

    • kCIInputIgnoreImageOrientationKey

      kCIInputIgnoreImageOrientationKey

      A key for specifying whether to ignore the image orientation. The associated value is a Boolean value packaged as an NSNumber object. The default value is NOfalse. An image is usually loaded in its proper orientation, as long as the associated metadata records its orientation. For special purposes you might want to load the image in its physical orientation. The exact meaning of "physical orientation” is dependent on the specific image.

      Available in OS X v10.5 and later.

    • kCIInputImageOrientationKey

      kCIInputImageOrientationKey

      A key for the image orientation. The associated value is an integer value packaged as an NSNumber object. Valid values are in range 1...8 and follow the EXIF specification. The value is disregarded when the kCIIgnoreImageOrientationKey flag is set. You can change the orientation of the image by overriding this value. By changing this value you can easily rotate an image in 90-degree increments.

      Available in OS X v10.5 and later.

    • kCIInputEnableSharpeningKey

      kCIInputEnableSharpeningKey

      A key for the sharpening state. The associated value must be an NSNumber object that specifies a BOOL value (YEStrue or NOfalse). The default is YEStrue. This option has no effect if the image used for initialization is not RAW.

      Available in OS X v10.5 and later.

    • kCIInputEnableChromaticNoiseTrackingKey

      kCIInputEnableChromaticNoiseTrackingKey

      A key for progressive chromatic noise tracking (based on ISO and exposure time). The associated value must be an NSNumber object that specifies a BOOL value (YEStrue or NOfalse). The default is YEStrue. This option has no effect if the image used for initialization is not RAW.

      Available in OS X v10.5 and later.

    • kCIInputNoiseReductionAmountKey

      kCIInputNoiseReductionAmountKey

      A key for the amount to reduce noise in the image. The associated value must be an NSNumber object that specifies a floating-point value between 0.0 and 1.0. The value has no effect if the image used for initialization is not RAW.

      Available in OS X v10.7 and later. Not available in iOS.

    • kCIInputBoostShadowAmountKey

      kCIInputBoostShadowAmountKey

      A key for the amount to boost the shadow areas of the image. The associated value must be an NSNumber object that specifies floating-point value. The value has no effect if the image used for initialization is not RAW.

      Available in OS X v10.5 and later.

    • kCIInputBiasKey

      kCIInputBiasKey

      A key for the simple bias value to use along with the exposure adjustment (kCIInputEVKey). The associated value must be an NSNumber object that specifies floating-point value. The value has no effect if the image used for initialization is not RAW.

      Available in OS X v10.5 and later.

    • kCIInputLinearSpaceFilter

      kCIInputLinearSpaceFilter

      A key for the filter to apply to the image while it is temporarily in a linear color space as part of RAW image processing. The associated value must be a CIFilter object.

      Available in OS X v10.7 and later. Not available in iOS.

    • kCIOutputNativeSizeKey

      kCIOutputNativeSizeKey

      A key for the full native size of the original, non-transformed RAW image. The associated value is a CIVector object whose X and Y values are the image’s width and height. This key is read-only.

      Available in OS X v10.5 and later. Not available in iOS.

    • kCIActiveKeys

      kCIActiveKeys

      A key for the set of input keys available for use. The associated value is an NSSet object containing the set of input keys which may be used to affect the output image. (Depending on the input image type and the decoder version, some input keys may be unavailable.) This key is read-only.

      Available in OS X v10.7 and later. Not available in iOS.

    Discussion

    You can also use the key kCIInputEVKey for RAW images.

    Import Statement