Creates a color kernel object from the specified kernel source code.
SDKs
- iOS 8.0–12.0Deprecated
- macOS 10.10–10.14Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–12.0Deprecated
Framework
- Core Image
Declaration
convenience init?(source string: String)
Parameters
string
A program in the Core Image Kernel Language that contains a single routine marked using the
kernel
keyword.
Return Value
A new color kernel object, or nil
if the specified source code does not contain a valid color kernel routine.
Discussion
This method is similar to the init(source:)
method of the superclass CIKernel
, but creates only color kernels. Use this method when you want to ensure that the type of kernel object returned (if any) is always CIColor
.