<!--
{
  "availability" : [
    "iOS: 14.3.0 -",
    "iPadOS: 14.3.0 -",
    "macCatalyst: 14.3.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCapturePhotoFileDataRepresentationCustomizer/replacementAppleProRAWCompressionSettings(for:defaultSettings:maximumBitDepth:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(pl)AVCapturePhotoFileDataRepresentationCustomizer(im)replacementAppleProRAWCompressionSettingsForPhoto:defaultSettings:maximumBitDepth:"
  },
  "title" : "replacementAppleProRAWCompressionSettings(for:defaultSettings:maximumBitDepth:)"
}
-->

# replacementAppleProRAWCompressionSettings(for:defaultSettings:maximumBitDepth:)

Replaces the compression settings the system uses when writing Apple ProRAW data to a Linear DNG file.

```
optional func replacementAppleProRAWCompressionSettings(for photo: AVCapturePhoto, defaultSettings: [String : Any], maximumBitDepth: Int) -> [String : Any]
```

## Parameters

`photo`

The calling photo instance.

`defaultSettings`

The default settings to use, if not overridden.

`maximumBitDepth`

The maximum bit depth you can specify in the returned settings dictionary.

## Return Value

A dictionary that contains the replacement compression settings.

## Discussion

The system calls this method when writing an Apple ProRAW image to a DNG file. To configure the compression settings the system uses when writing the file, return a dictionary that contains values for the following keys:

- [`AVVideoQualityKey`](/documentation/AVFoundation/AVVideoQualityKey). A floating-point value from 0.0 to 1.0. Specify a value of 1.0 to use lossless compression, or less than 1.0 for lossy compression.
- [`AVVideoAppleProRAWBitDepthKey`](/documentation/AVFoundation/AVVideoAppleProRAWBitDepthKey). An integer value from 8 to `maximumBitDepth`. Setting this key to a value less than the value specified in `defaultSettings` may result in quantization losses.

Any keys not specified in the returned dictionary use the values from the `defaultSettings` dictionary. If your delegate object doesn’t implement this method, the system uses the default compression settings for DNG files.

---

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)