---
title: cacheDepthMatchesImageDepth
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsimage/cachedepthmatchesimagedepth
---

# cacheDepthMatchesImageDepth

Returns a Boolean value that indicates whether an image’s offscreen window caches use the same bit depth as the image data itself.

## Declaration

```occ
- (BOOL) cacheDepthMatchesImageDepth;
```

## Return Value

Return Value true if the offscreen window caches use the same bit depth as the image data; otherwise, false. The default value is false.

## See Also

### Related Documentation

- [setCacheDepthMatchesImageDepth:](appkit/nsimage/setcachedepthmatchesimagedepth:.md)

### Instance Methods

- [lockFocus()](appkit/nsimage/lockfocus().md)
- [lockFocusFlipped(_:)](appkit/nsimage/lockfocusflipped(_:).md)
- [unlockFocus()](appkit/nsimage/unlockfocus().md)
- [init(iconRef:)](appkit/nsimage/init(iconref:).md)
- [lockFocusOnRepresentation:](appkit/nsimage/lockfocusonrepresentation:.md)
- [bestRepresentationForDevice:](appkit/nsimage/bestrepresentationfordevice:.md)
- [compositeToPoint:operation:](appkit/nsimage/compositetopoint:operation:.md)
- [compositeToPoint:fromRect:operation:](appkit/nsimage/compositetopoint:fromrect:operation:.md)
- [compositeToPoint:fromRect:operation:fraction:](appkit/nsimage/compositetopoint:fromrect:operation:fraction:.md)
- [compositeToPoint:operation:fraction:](appkit/nsimage/compositetopoint:operation:fraction:.md)
- [dissolveToPoint:fraction:](appkit/nsimage/dissolvetopoint:fraction:.md)
- [dissolveToPoint:fromRect:fraction:](appkit/nsimage/dissolvetopoint:fromrect:fraction:.md)
- [setScalesWhenResized:](appkit/nsimage/setscaleswhenresized:.md)
- [scalesWhenResized](appkit/nsimage/scaleswhenresized.md)
- [setDataRetained:](appkit/nsimage/setdataretained:.md)
