Skip to content

SwiftCube is a lightweight swift package to turn .cube LUTs into Core Image Filters

License

Notifications You must be signed in to change notification settings

ronan18/SwiftCube

Repository files navigation

SwiftCube

SwiftCube is a lightweight swift package to turn .cube LUTs into Core Image Filters.

SwiftCube powers FrameUP, the essential director's viewfinder.

Supports

SwiftCube supports 3D luts in the .cube format with maximum and minimum dimensions of 1 and 0, respectively.

Requires macOS 10.15 and iOS 13 or greater.

Usage

Intalize a LUT

let lutFromURL = try SC3DLUT(contentsOf: URL)
let lutFromFileData = try SC3DLUT(fileData: Data)
let lutFromDataRepresentation = try SC3DLUT(dataRepresentation: Data)

Create a CIFilter Returns a CIFilter.colorCubeWithColorSpace() filter in CGColorSpaceCreateDeviceRGB() colorspace.

let lut: SC3DLUT = try SC3DLUT(contentsOf: URL)
let filter = try lut.ciFilter()

Turn LUT into data for saving

let lut: SC3DLUT = try SC3DLUT(contentsOf: URL)
let filter = try lut.rawDataRepresentation()

References

Based off of Cocoa LUT & parse-cube-lut

About

SwiftCube is a lightweight swift package to turn .cube LUTs into Core Image Filters

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages