PixelKit Demos

Color Correction

pod 'PixelKit'
import PixelKit
let image = ImagePIX()
image.image = UIImage(named: "Öland")

let res = ResPIX(res: .fullscreen)
res.inPix = image
res.placement = .aspectFill

let gradient1 = GradientPIX(res: image.resolution!)
gradient1.direction = .vertical

let lumaLevels1 = LumaLevelsPIX()
lumaLevels1.inPixA = image
lumaLevels1.inPixB = gradient1
lumaLevels1.gamma = 0.5

let gradient2 = GradientPIX(res: image.resolution!)
gradient2.direction = .horizontal

let lumaLevels2 = LumaLevelsPIX()
lumaLevels2.inPixA = lumaLevels1
lumaLevels2.inPixB = gradient2
lumaLevels2.brightness = 2.0

let sepia = SepiaPIX()
sepia.inPix = lumaLevels2
sepia.color = .orange

let cross = CrossPIX()
cross.inPixA = lumaLevels2
cross.inPixB = sepia
cross.fraction = 0.5

let finalPix: PIX = cross
finalPix.view.frame = view.bounds
view.addSubview(finalPix.view)
Created by Hexagons