SwiftCube is a lightweight swift package to turn .cube LUTs into Core Image Filters.
SwiftCube powers FrameUP, the essential director's viewfinder.
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.
Intalize a LUT
let lutFromURL = try SC3DLUT(contentsOf: URL)
let lutFromFileData = try SC3DLUT(fileData: Data)
let lutFromDataRepresentation = try SC3DLUT(dataRepresentation: Data)
Create a CIFilter
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()