I would like to be able to write CIKernels that output a lookup table or other blob of data, to be used by subsequent CIKernels.
The data generated by such a kernel is fed to subsequent kernels whose corresponsing sampler input has been tagged with the "__table" attribute to disable colormatching for that input. This is a scenario that already works if one has the ability to allocate the CIImage himself, so that a nil colorspace can be passed. But when asking CIKernel for an output image, it is not possible to request an image without a colorspace associated with it. I'm referring to methods like this:
- applyWithExtent:roiCallback:arguments:
There are also no APIs in Core Image that would allow you to strip colorspace information from an existing image, AFAIK. (As in "hey I know this recipe is tagged with the working/output colorspace, but in reality it contains values that do not encode RGB at all")
If I feed the output image from applyWithExtent:... to another kernel whose sampler has the __table attribute, from my observations it still appears to be colormatched. I can see three possibilities:
1) I am clearly missing something.
2) The __table attribute no longer has the desired effect, perhaps a regression.
3) A new API is needed to cover this usage scenario.
Any help is greatly appreciated!
Best,
Gabe