<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBitmapImageRep/PropertyKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSBitmapImageRepPropertyKey"
  },
  "title" : "NSBitmapImageRep.PropertyKey"
}
-->

# NSBitmapImageRep.PropertyKey

Constants that identify bitmap image representation properties.

```
struct PropertyKey
```

## Discussion

Use these constants with [`representationOfImageReps(in:using:properties:)`](/documentation/AppKit/NSBitmapImageRep/representationOfImageReps(in:using:properties:)), [`representation(using:properties:)`](/documentation/AppKit/NSBitmapImageRep/representation(using:properties:)), [`setPixel(_:atX:y:)`](/documentation/AppKit/NSBitmapImageRep/setPixel(_:atX:y:)), and [`value(forProperty:)`](/documentation/AppKit/NSBitmapImageRep/value(forProperty:)).

When using the [`value(forProperty:)`](/documentation/AppKit/NSBitmapImageRep/value(forProperty:)) method to retrieve the the value for any of these keys, be sure to check that the returned value is non-`nil` before you attempt to use it. A bitmap image representation may return `nil` for any values that have not yet been set.

## Topics

### Bitmap Properties

[`static let colorSyncProfileData: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/colorSyncProfileData)

Identifies an `NSData` object containing the ColorSync profile data.

[`static let compressionFactor: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/compressionFactor)

Identifies an `NSNumber` object containing the compression factor of the image.

[`static let compressionMethod: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/compressionMethod)

Identifies an `NSNumber` object identifying the compression method of the image.

[`static let currentFrame: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/currentFrame)

Identifies an `NSNumber` object containing the current frame for an animated GIF file.

[`static let currentFrameDuration: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/currentFrameDuration)

Identifies an `NSNumber` object containing the duration (in seconds) of the current frame for an animated GIF image.

[`static let ditherTransparency: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/ditherTransparency)

Identifies an `NSNumber` object containing a Boolean that indicates whether the image is dithered.

[`static let exifData: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/exifData)

Identifies an `NSDictionary` object containing the EXIF data for the image.

[`static let fallbackBackgroundColor: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/fallbackBackgroundColor)

Specifies the background color to use when writing to an image format (such as JPEG) that doesn’t support alpha.

[`static let frameCount: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/frameCount)

Identifies an `NSNumber` object containing the number of frames in an animated GIF file.

[`static let gamma: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/gamma)

Identifies an `NSNumber` object containing the gamma value for the image.

[`static let interlaced: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/interlaced)

Identifies an `NSNumber` object containing a Boolean value that indicates whether the image is interlaced.

[`static let loopCount: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/loopCount)

Identifies an `NSNumber` object containing the number of loops to make when animating a GIF image.

[`static let progressive: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/progressive)

Identifies an `NSNumber` object containing a Boolean that indicates whether the image uses progressive encoding.

[`static let rgbColorTable: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/rgbColorTable)

Identifies an `NSData` object containing the RGB color table.

### Initializers

[`init(String)`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/init(_:))

[`init(rawValue: String)`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/init(rawValue:))

### Type Properties

[`static let imageIPTCData: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/imageIPTCData)

[`static let imageIPTCData: NSBitmapImageRep.PropertyKey`](/documentation/AppKit/NSBitmapImageRep/PropertyKey/imageIPTCData)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)