Thursday, September 11, 2025
HomeiOS Developmentios - Learn how to keep away from CIImage init from MTLTexture...

ios – Learn how to keep away from CIImage init from MTLTexture from altering colour area?


I’ve dumped the uncooked pixel information from my MTLTexture to substantiate it’s what I anticipate, but when I create a CIImage from the identical texture, the colour area adjustments fairly a bit. I am unable to work out what CIImage is doing and how you can preserve it from altering the pixel information in any method.

I’ve tried the next:

 CIImage(mtlTexture: texture, choices: [CIImageOption.colorSpace: NSNull.self])!
 CIImage(mtlTexture: texture, choices: [CIImageOption.colorSpace: nil])!
 CIImage(mtlTexture: texture, choices: [:])

All of those alter the colour area in the identical method (most likely adjusting gamma, it appears).

How can I create a CIImage that simply respects the present RGB information with out altering it?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments