<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSImageDelegate"
  },
  "title" : "NSImageDelegate"
}
-->

# NSImageDelegate

A set of optional methods that you can use to respond to drawing failures and manage incremental loads.

```
protocol NSImageDelegate : NSObjectProtocol
```

## Topics

### Responding to Drawing Failure

[`imageDidNotDraw(_:in:)`](/documentation/AppKit/NSImageDelegate/imageDidNotDraw(_:in:))

Tells the delegate that the image object is unable, for whatever reason, to lock focus on its image or draw in the specified rectangle.

### Managing Incremental Loads

[`image:didLoadPartOfRepresentation:withValidRows:`](/documentation/AppKit/NSImageDelegate/image:didLoadPartOfRepresentation:withValidRows:)

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

[`image:didLoadRepresentation:withStatus:`](/documentation/AppKit/NSImageDelegate/image:didLoadRepresentation:withStatus:)

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

[`image:didLoadRepresentationHeader:`](/documentation/AppKit/NSImageDelegate/image:didLoadRepresentationHeader:)

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

[`image:willLoadRepresentation:`](/documentation/AppKit/NSImageDelegate/image:willLoadRepresentation:)

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

[`NSImage.LoadStatus`](/documentation/AppKit/NSImage/LoadStatus)

Status values for incremental image loading.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)