Creates and returns an image object initialized with data supplied by an OpenGL texture.
- iOS 6.0–12.0Deprecated
- macOS 10.4–10.14Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- tvOS 9.0–12.0Deprecated
- Core Image
An OpenGL texture. Because
CIImageobjects are immutable, the texture must remain unchanged for the life of the image object. See the discussion for more information.
The dimensions of the texture.
YESto have Core Image flip the coordinates of the texture vertically to convert between OpenGL and Core Image coordinate systems.
The color space that the image is defined in. If the
nil, the image is not color matched. Pass
nilfor images that don’t contain color data (such as elevation maps, normal vector maps, and sampled function tables).
An image object initialized with the texture data.
When using a texture to create a
CIImage object, the texture must be valid in the Core Image context (
CIContext) that you draw the
CIImage object into. This means that one of the following must be true:
The texture must be created using the
CGLContextobject that the Core Image context is based on.
The context that the texture was created in must be shared with the
CGLContextthat the Core Image context is based on.
Note that textures do not have a retain and release mechanism. This means that your application must make sure that the texture exists for the life cycle of the image. When you no longer need the image, you can delete the texture.
Core Image ignores the texture filtering and wrap modes (
GL) that you set through OpenGL. The filter and wrap modes are overridden by what the
CISampler object specifies when you apply a filter to the