Initializer

init(iconRef:)

Initializes the image object with a Carbon-style icon resource.

Declaration

convenience init(iconRef: IconRef)

Parameters

iconRef

A reference to a Carbon icon resource.

Return Value

An initialized NSImage object.

Discussion

Creates one or more bitmap image representations, one for each size icon contained in the IconRef data structure. This initialization method automatically retains the data in the iconRef parameter and loads the bitmaps from that data file lazily.

See Also

Creating an Image from Existing Data

init?(data: Data)

Initializes and returns an image object using the provided image data.

init?(dataIgnoringOrientation: Data)

Initializes and returns an image object using the provided image data and ignoring the EXIF orientation tags.

init(cgImage: CGImage, size: NSSize)

Initializes and returns an image object using the contents of a Core Graphics image.

init?(pasteboard: NSPasteboard)

Initializes and returns an image object with data from the specified pasteboard.