Can I use Metal to modify a RAW photo image, and then save it to file?

I got a RAW Image CGImage from file, its pixel format is <CV14BayerRggb 1919379252>

then, convert it to MTLTexture <RGBA16Uint>

then, modify some pixel color and write to another MTLTexture <RGBA16Uint>

then, I want to create a CIImage from output texture,

there raised a error told me create CIImage failed, unsupported texutre format.
Answered by Graphics and Games Engineer in 664631022
I assume you're getting an error when you call -[CImage imageWithMTLTexture:options:]?

CIImage only supports some basic texture formats and MTLTextureFormatRGBA16Uint isn't one of them. Why have you chosen that format in particular? Can you use RGBA32Float or RGBA16Float instead?
Accepted Answer
I assume you're getting an error when you call -[CImage imageWithMTLTexture:options:]?

CIImage only supports some basic texture formats and MTLTextureFormatRGBA16Uint isn't one of them. Why have you chosen that format in particular? Can you use RGBA32Float or RGBA16Float instead?
You are right, thank you
Can I use Metal to modify a RAW photo image, and then save it to file?
 
 
Q