iOS/Metal

Metal: MTLTexture to CIImage 변경 시 rgb값 그대로 가져오기

0zerohyun 2022. 1. 6. 16:26
let options = [CIImageOption.colorSpace: CGColorSpaceCreateDeviceRGB()] as [CIImageOption: Any]
let image = CIImage.init(mtlTexture: texture, options: options)

option에 CGColorSpaceCreateDeviceRGB()를 추가한다.

 

https://stackoverflow.com/questions/51792808/ios-color-space-metal-texture-to-ui-image-iphone-vs-ipad-camera