Contents

formatForInput(at:)

Override this class method if you want your any of the inputs to be in a specific pixel format.

Declaration

class func formatForInput(at inputIndex: Int32) -> CIFormat

Discussion

The format must be one of kCIFormatBGRA8, kCIFormatRGBAh, kCIFormatRGBAf or kCIFormatR8. On iOS 12 and macOS 10.14, the formats kCIFormatRh and kCIFormatRf are also supported.

If the requested inputFormat is 0, then the input will be a supported format that best matches the rendering context’s /CIContext/workingFormat.

If a processor wants data in a colorspace other than the context’s working color space, then call /CIImage/imageByColorMatchingWorkingSpaceToColorSpace: on the processor input. If a processor wants it input as alpha-unpremultiplied RGBA data, then call /CIImage/imageByUnpremultiplyingAlpha on the processor input.

See Also

Type Methods