---
title: NSCustomImageRep
framework: appkit
role: symbol
role_heading: Class
path: appkit/nscustomimagerep
---

# NSCustomImageRep

An object that uses a delegate object to render an image from a custom format.

## Declaration

```swift
class NSCustomImageRep
```

## Overview

Overview When called upon to produce an image, an NSCustomImageRep sends a message to its delegate to do the actual drawing. You can use this class to support custom image formats without going to the trouble of subclassing NSImageRep directly.

## Topics

### Creating Representations of Images in Custom Formats

- [init(draw:delegate:)](appkit/nscustomimagerep/init(draw:delegate:).md)
- [init(size:flipped:drawingHandler:)](appkit/nscustomimagerep/init(size:flipped:drawinghandler:).md)

### Getting Drawing Handlers

- [drawingHandler](appkit/nscustomimagerep/drawinghandler.md)

### Getting Information About Images

- [delegate](appkit/nscustomimagerep/delegate.md)
- [drawSelector](appkit/nscustomimagerep/drawselector.md)

### Initializers

- [init(drawSelector:delegate:)](appkit/nscustomimagerep/init(drawselector:delegate:).md)

## Relationships

### Inherits From

- [NSImageRep](appkit/nsimagerep.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
