Mac Developer Library

Developer

QuartzCore Framework Reference CIPlugIn Class Reference

Options
Deployment Target:

On This Page
Language:

CIPlugIn

The CIPlugIn class loads image units. An image unit is an image processing bundle that contains one or more Core Image filters. The .plugin extension indicates one or more filters that are packaged as an image unit.

Inheritance


Conforms To


Import Statement


Swift

import QuartzCore

Objective-C

@import QuartzCore;

Availability


OS X v10.4 and later
  • Scans directories for files that have the .plugin extension and then loads the image units.

    Declaration

    Swift

    class func loadAllPlugIns()

    Objective-C

    + (void)loadAllPlugIns

    Discussion

    This method scans the following directories:

    • /Library/Graphics/Image Units

    • ~/Library/Graphics/Image Units

    Call this method once. If you call this method more than once, Core Image loads newly added image units, but image units (and the filters they contain) that are already loaded are not removed.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Scans directories for files that have the .plugin extension and then loads only those filters that are marked by the image unit as non-executable filters.

    Declaration

    Swift

    class func loadNonExecutablePlugIns()

    Objective-C

    + (void)loadNonExecutablePlugIns

    Discussion

    This call does not execute any of the code in the image unit, it simply loads the code. You need to call this method only once to load a specific image unit. The behavior of this method is not defined for multiple calls for the same image unit.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.4 and later.

  • Loads filters from an image unit that have the appropriate executable status.

    Declaration

    Swift

    class func loadPlugIn(_ url: NSURL!, allowExecutableCode allowExecutableCode: Bool)

    Objective-C

    + (void)loadPlugIn:(NSURL *)url allowExecutableCode:(BOOL)allowExecutableCode

    Parameters

    url

    The location of the image unit to load.

    allowExecutableCode

    YEStrue to load all filters from the image unit, or NOfalse to load only those filters without CPU executable code.

    Discussion

    You need to call this method only once to load a specific image unit. The behavior of this method is not defined for multiple calls for the same image unit. If you pass NOfalse for the allowExecutableCode parameter, Core Image will load only pure kernel filters that run entirely on the GPU, ignoring filters implemented using compiled Objective-C code.

    Import Statement

    Objective-C

    @import QuartzCore;

    Swift

    import QuartzCore

    Availability

    OS X v10.7 and later.

  • Loads filters from an image unit that have the appropriate executable status.

    Deprecation Statement

    Instead use loadPlugIn:allowExecutableCode:.

    Declaration

    Objective-C

    + (void)loadPlugIn:(NSURL *)url allowNonExecutable:(BOOL)allowNonExecutable

    Parameters

    url

    The location of the image unit to load.

    allowNonExecutable

    TRUE to load only those filters that are marked by the image unit as non-executable filters.

    Discussion

    You need to call this method only once to load a specific image unit. The behavior of this method is not defined for multiple calls for the same image unit.

    Import Statement

    Objective-C

    @import QuartzCore;

    Availability

    Available in OS X v10.4 and later.

    Deprecated in OS X v10.7.