<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImage/cacheDepthMatchesImageDepth",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImage(im)cacheDepthMatchesImageDepth"
  },
  "title" : "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.

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the offscreen window caches use the same bit depth as the image data; otherwise, <doc://com.apple.documentation/documentation/Swift/false>. The default value is <doc://com.apple.documentation/documentation/Swift/false>.

## See Also

[`- (void) setCacheDepthMatchesImageDepth:(BOOL) flag;`](/documentation/AppKit/NSImage/setCacheDepthMatchesImageDepth:)

Sets whether the image’s offscreen window caches use the same bit depth as the image data itself.



---

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)