init(url:width:height:)
Creates an image object, of the specified size, from an image file in the local file system.
Declaration
convenience init?(url URL: URL, width: Double, height: Double)Parameters
- URL:
A URL to an image file on the local file system. The image can be in any format that the system supports.
- width:
The required width, in points, of the image. If necessary, the system scales the image, horizontally, to match this value.
- height:
The request height, in points, of the image. If necessary, the system scales the image, vertically, to match this value.
Return Value
An image object that contains the local image file at the specified size, or nil if the system can’t load the image file or it doesn’t exist.