<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageRep/size",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImageRep(py)size"
  },
  "title" : "size"
}
-->

# size

The size of the image representation, measured in points in the user coordinate space.

```
var size: NSSize { get set }
```

## Discussion

This size is the size of the image representation when it’s rendered. It is not necessarily the same as the width and height of the image in pixels as specified by the image data, nor must it be equal to the size set for the `NSImage` object that wraps this image representation.

The size of an image representation combined with the physical dimensions of the image data determine the resolution of the image.

## See Also

[`pixelsHigh`](/documentation/AppKit/NSImageRep/pixelsHigh)

The height of the image, measured in pixels.

[`pixelsWide`](/documentation/AppKit/NSImageRep/pixelsWide)

The width of the image, measured in pixels.

[`draw()`](/documentation/AppKit/NSImageRep/draw())

Implemented by subclasses to draw the image in the current coordinate system.



---

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)