Latest 0.9.9
Homepage https://github.com/muukii/LightRoom
License MIT
Platforms ios 8.0
Dependencies SwiftyJSON
Frameworks Foundation, SwiftyJSON
Authors

CI Status
Version
License
Platform

Easy Chaining ImageFilter with CoreImage

My App Fil is powered by LightRoom.


Installation

LightRoom is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LightRoom"

Usage

First, create FilterComponents.
Then create a FilterChain using them.

Chaining

image1 >>> colorControl --* addition
             blendImage >>> addition --* overlay
            image2 >>> colorControl2 >>> overlay

Multiple Chaining

You can connect FilterChains with each other using >>>

let colorControl = LightRoom.ColorAdjustment.ExposureAdjust(ev: 1)

let chain1 = FilterChain { (image: CIImage?) -> CIImage? in
    image >>> colorControl
    return colorControl.outputImage
}

let colorControl2 = LightRoom.ColorAdjustment.ColorControls(saturation: 0.3, brightness: 0, contrast: 1)
let chain2 = FilterChain { (image: CIImage?) -> CIImage? in
    image >>> colorControl2
    return colorControl2.outputImage
}

image1 >>> chain1 >>> chain2
chain2.outputImage

Performance

FilterComponent has a CIFilter, which is cached and will be created only once.

This structure is advantageous in performance, and is great for real-time filtering camera implementation.

Latest podspec

{
    "name": "LightRoom",
    "version": "0.9.9",
    "summary": "CoreImage Library",
    "description": "Easy Chaining ImageFilter with CoreImage.",
    "homepage": "https://github.com/muukii/LightRoom",
    "license": "MIT",
    "authors": {
        "muukii": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/muukii/LightRoom.git",
        "tag": "0.9.9"
    },
    "source_files": "LightRoom/Classes/**/*.swift",
    "exclude_files": "Classes/Exclude",
    "frameworks": [
        "Foundation",
        "SwiftyJSON"
    ],
    "dependencies": {
        "SwiftyJSON": [
            "2.3.0"
        ]
    }
}

Pin It on Pinterest

Share This