Loading a DNG into CIRAWFilter and use HDR

I have DNG files that I want to open and show as EDR content in my app. It seems like the DNG files should have enough per pixel information to show more colors that Display P3 but whenever I load the images using CIRawFilter and then inspect the outputImage color space it is always "DisplayP3", not something like "ITU-R BT.2100 PQ" there doesn't seem to be any way to make it load with a different color space for displaying EDR images.

Does this make sense for DNG files, it seems like it should?

If I open the same file using CIImage with the expandToHDR option e.g.

CIImage(contentsOf: rawURL, options: [.expandToHDR: true]) 

then it does have the desired EDR color space, but then I don't get any of the properties that are available via the CIRAWFilter class to manipulate the data.

Basically I just want to be able to open the DNG file via CIRAWFilter and then display it in my SwiftUI app as an EDR image by adding the allowedDynamicRange(.high) property.

Image("my-dng-image").allowedDynamicRange(.high)

Or do DNG files (just RAW not ProRAW) not contain enough information to be displayed as EDR images, seems like they should.

I should note that I am settings the CIRAWFilter extendedDynamicRangeAmount to 2.0 before calling outputImage and still not getting a EDR image color space.

e.g.

guard let filter = CIRAWFilter(
      imageURL: rawURL,
      options: [:]
    ) else {
      return nil
    }

filter.extendedDynamicRangeAmount = 2.0 // also tried 1.0

filter.outputImage?.colorSpace -> still SDR not EDR
Loading a DNG into CIRAWFilter and use HDR
 
 
Q