Creates and returns an image object initialized with data provided by an image provider.
SDKs
- iOS 9.0+
- macOS 10.4+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Core Image
Declaration
+ (CIImage *)imageWithImageProvider:(id)p size:(size _t)width :(size _t)height format:(CIFormat)f colorSpace:(CGColor Space Ref)cs options:(NSDictionary<CIImage Option, id> *)options;
Parameters
p
A data provider that implements the CIImageProvider informal protocol. Core Image maintains a strong reference to this object until the image is deallocated.
width
The width of the image.
height
The height of the image.
f
A pixel format constant. See Pixel Formats.
cs
The color space that the image is defined in. If the this value is
nil
, the image is not color matched. Passnil
for images that don’t contain color data (such as elevation maps, normal vector maps, and sampled function tables).dict
A dictionary that specifies image-creation options, either
k
orCIImage Provider Tile Size k
. See CIImageProvider for more information on these options.CIImage Provider User Info
Return Value
An image object initialized with the data from the data provider. Core Image does not populate the image object until the object needs the data.