Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.06 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.06 KB

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