<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageRepMatchesDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@Ea@NSImageRepMatchesDevice@NSImageRepMatchesDevice"
  },
  "title" : "NSImageRepMatchesDevice"
}
-->

# NSImageRepMatchesDevice

A constant indicating that the value of certain attributes, such as the number of colors or bits per sample, will change to match the display device.

```
var NSImageRepMatchesDevice: Int { get }
```

## Discussion

This value can be passed in (or received back) as the value of [`bitsPerSample`](/documentation/AppKit/NSImageRep/bitsPerSample), [`pixelsWide`](/documentation/AppKit/NSImageRep/pixelsWide), and [`pixelsHigh`](/documentation/AppKit/NSImageRep/pixelsHigh).

---

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)