Contents

replacementAppleProRAWCompressionSettings(for:defaultSettings:maximumBitDepth:)

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

Declaration

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. 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. 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.

See Also

Replacing or removing metadata