Type Method
imageWithContentsOfFile:
Creates and returns an image object by loading the image data from the file at the specified path.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Parameters
path
The full or partial path to the file.
Return Value
A new image object for the specified file, or nil
if the method could not initialize the image from the specified file.
Discussion
This method does not cache the image object.
See Also
Creating and Initializing Image Objects
+ imageWithData:
Creates and returns an image object that uses the specified image data.
+ imageWithData:scale:
Creates and returns an image object that uses the specified image data and scale factor.
+ imageWithCGImage:
Creates and returns an image object representing the specified Quartz image.
- initWithData:
Initializes and returns the image object with the specified data.
- initWithCGImage:
Initializes and returns the image object with the specified Quartz image reference.
- initWithCIImage:
Initializes and returns an image object with the specified Core Image object.