PhotoEffect
@available(iOS 9.0, *)
@objcMembers
@objc(PESDKPhotoEffect)
open class PhotoEffect : NSObject
The PhotoEffect
class describes an effect that can be applied to a photo.
-
The identifier of the effect.
Declaration
Swift
public let identifier: String
-
The name of the
CIFilter
that should be used to apply this effect.Declaration
Swift
public let ciFilterName: String?
-
The URL of the lut image that should be used to generate a color cube.
Declaration
Swift
public let lutURL: URL?
-
The name that is displayed to the user.
Declaration
Swift
public let displayName: String
-
Additional options that should be passed to the
CIFilter
object that will be created when applying this effect.Declaration
Swift
public let options: [String : AnyObject]?
-
Creates a new photo effect.
Declaration
Swift
public init(identifier: String, ciFilterName filterName: String?, displayName: String, options: [String : AnyObject]?)
Parameters
identifier
An identifier that uniquely identifies the effect.
filterName
The name of the
CIFilter
that should be used to apply this effect.displayName
The name that is displayed to the user.
options
Additional options that should be passed to the
CIFilter
object that will be created when applying this effect.Return Value
A newly initialized
PhotoEffect
object. -
Creates a photo effect that uses the LUT at url
lutURL
to generate the color cube data for the filter.Declaration
Swift
public init(identifier: String, lutURL: URL?, displayName: String)
Parameters
identifier
An identifier that uniquely identifies the effect.
lutURL
The URL of the lut image that should be used to generate a color cube.
displayName
The name that is displayed to the user.
Return Value
A newly initialized
PhotoEffect
object. -
Returns a new
CIFilter
object with the given name and options.Declaration
Swift
open var newEffectFilter: CIFilter? { get }
-
Change this array to only support a subset of all available filters or to include custom filters. By default this array includes all available filters.
Declaration
Swift
public static var allEffects: [PhotoEffect] = [ PhotoEffect(identifier: NeutralModelValues.none, lutURL: nil, displayName: "pesdk_filter_button_none".localized), PhotoEffect(identifier: "imgly_lut_k1", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_k1_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_k1".localized), PhotoEffect(identifier: "imgly_lut_k2", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_k2_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_k2".localized), PhotoEffect(identifier: "imgly_lut_k6", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_k6_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_k6".localized), PhotoEffect(identifier: "imgly_lut_dynamic", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_kdynamic_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_dynamic".localized), PhotoEffect(identifier: "imgly_lut_fridge", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_fridge_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_fridge".localized), PhotoEffect(identifier: "imgly_lut_breeze", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_breeze_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_breeze".localized), PhotoEffect(identifier: "imgly_lut_orchid", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_orchid_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_orchid".localized), PhotoEffect(identifier: "imgly_lut_chest", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_chest_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_chest".localized), PhotoEffect(identifier: "imgly_lut_front", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_front_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_front".localized), PhotoEffect(identifier: "imgly_lut_fixie", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_fixie_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_fixie".localized), PhotoEffect(identifier: "imgly_lut_x400", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_x400_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_x400".localized), PhotoEffect(identifier: "imgly_lut_bw", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_bw_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_bw".localized), PhotoEffect(identifier: "imgly_lut_ad1920", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_ad1920_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_ad1920".localized), PhotoEffect(identifier: "imgly_lut_lenin", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_lenin_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_lenin".localized), PhotoEffect(identifier: "imgly_lut_quozi", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_quozi_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_quozi".localized), PhotoEffect(identifier: "imgly_lut_pola669", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_pola669_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_669".localized), PhotoEffect(identifier: "imgly_lut_polasx", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_polasx_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_sx".localized), PhotoEffect(identifier: "imgly_lut_food", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_food_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_food".localized), PhotoEffect(identifier: "imgly_lut_glam", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_glam_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_glam".localized), PhotoEffect(identifier: "imgly_lut_celsius", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_celsius_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_celsius".localized), PhotoEffect(identifier: "imgly_lut_texas", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_texas_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_texas".localized), PhotoEffect(identifier: "imgly_lut_lomo", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_lomo100_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_lomo".localized), PhotoEffect(identifier: "imgly_lut_goblin", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_gobblin_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_goblin".localized), PhotoEffect(identifier: "imgly_lut_sin", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_sin_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_sin".localized), PhotoEffect(identifier: "imgly_lut_mellow", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_mellow_8_8_512", withExtension: "png"), displayName: "pesdk_filter_asset_mellow".localized), PhotoEffect(identifier: "imgly_lut_soft", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_soft_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_soft".localized), PhotoEffect(identifier: "imgly_lut_blues", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_blues_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_blues".localized), PhotoEffect(identifier: "imgly_lut_elder", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_elder_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_elder".localized), PhotoEffect(identifier: "imgly_lut_sunset", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_sunset_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_sunset".localized), PhotoEffect(identifier: "imgly_lut_evening", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_evening_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_evening".localized), PhotoEffect(identifier: "imgly_lut_steel", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_steel_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_steel".localized), PhotoEffect(identifier: "imgly_lut_seventies", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_seventies_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_70s".localized), PhotoEffect(identifier: "imgly_lut_highcontrast", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_highcontrast_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_hicon".localized), PhotoEffect(identifier: "imgly_lut_blueshadows", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_blueshadows_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_blueShade".localized), PhotoEffect(identifier: "imgly_lut_highcarb", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_highcarb_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_carb".localized), PhotoEffect(identifier: "imgly_lut_eighties", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_eighties_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_80s".localized), PhotoEffect(identifier: "imgly_lut_colorful", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_colorful_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_colorful".localized), PhotoEffect(identifier: "imgly_lut_lomo100", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_lomo100_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_lomo100".localized), PhotoEffect(identifier: "imgly_lut_oro400", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_pro400_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_pro400".localized), PhotoEffect(identifier: "imgly_lut_twilight", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_twilight_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_twilight".localized), PhotoEffect(identifier: "imgly_lut_cottoncandy", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_cottoncandy_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_candy".localized), PhotoEffect(identifier: "imgly_lut_pale", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_pale_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_pale".localized), PhotoEffect(identifier: "imgly_lut_settled", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_settled_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_settled".localized), PhotoEffect(identifier: "imgly_lut_cool", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_cool_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_cool".localized), PhotoEffect(identifier: "imgly_lut_litho", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_litho_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_litho".localized), PhotoEffect(identifier: "imgly_lut_ancient", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_ancient_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_ancient".localized), PhotoEffect(identifier: "imgly_lut_pitched", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_pitched_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_pitched".localized), PhotoEffect(identifier: "imgly_lut_lucid", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_lucid_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_lucid".localized), PhotoEffect(identifier: "imgly_lut_creamy", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_creamy_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_creamy".localized), PhotoEffect(identifier: "imgly_lut_keen", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_keen_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_keen".localized), PhotoEffect(identifier: "imgly_lut_tender", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_tender_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_tender".localized), PhotoEffect(identifier: "imgly_lut_bleached", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_bleached_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_bleached".localized), PhotoEffect(identifier: "imgly_lut_bleachedblue", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_bleachedblue_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_bBlue".localized), PhotoEffect(identifier: "imgly_lut_fall", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_fall_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_fall".localized), PhotoEffect(identifier: "imgly_lut_winter", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_winter_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_winter".localized), PhotoEffect(identifier: "imgly_lut_sepiahigh", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_sepiahigh_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_sepiaHigh".localized), PhotoEffect(identifier: "imgly_lut_summer", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_summer_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_summer".localized), PhotoEffect(identifier: "imgly_lut_classic", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_classic_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_classic".localized), PhotoEffect(identifier: "imgly_lut_nogreen", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_nogreen_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_noGreen".localized), PhotoEffect(identifier: "imgly_lut_neat", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_neat_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_neat".localized), PhotoEffect(identifier: "imgly_lut_plate", lutURL: Bundle.pesdkBundle.url(forResource: "imgly_lut_plate_5_5_128", withExtension: "png"), displayName: "pesdk_filter_asset_plate".localized) ]
-
This method returns the photo effect with the given identifier if such an effect exists.
Declaration
Swift
public static func effect(withIdentifier identifier: String) -> PhotoEffect?
Parameters
identifier
The identifier of the photo effect.
Return Value
A
PhotoEffect
object.