Instance Method

image(_:willLoadRepresentation:)

Tells the delegate that the image object is about to access its underlying bitmap data.

Declaration

optional func image(_ image: NSImage, willLoadRepresentation rep: NSImageRep)

Parameters

image

The image object whose contents need to be loaded.

rep

The image representation object that was accessed.

Discussion

For incremental loading, this method is called when you first attempt to draw the image or otherwise access the bitmap data. Downloading of the image begins immediately after this method returns. This method is optional; incremental loading will continue if the delegate does not implement it.

See Also

Managing Incremental Loads

func image(NSImage, didLoadPartOfRepresentation: NSImageRep, withValidRows: Int)

Tells the delegate that part of the incrementally loaded image data is available.

func image(NSImage, didLoadRepresentation: NSImageRep, with: NSImage.LoadStatus)

Tells the delegate that an incrementally loaded image has been loaded and decompressed as completely as is possible.

func image(NSImage, didLoadRepresentationHeader: NSImageRep)

Tells the delegate that enough data has been read to determine the size of the image.

enum NSImage.LoadStatus

Status values for incremental image loading.