AVCapturePhoto metadata doesn't contain opcode lists for RAW photos

How can I tell which DNG opcode belongs to which OpcodeList for a RAW image captured by AVPhotoOutput?

I couldn't find any of the OpcodeList1, OpcodeList2 or OpcodeList3 tags in the DNG metadata inside AVCapturePhoto.metadata, but when exporting the photo into a DNG file to disk and extracting that DNG file's metadata using exiftool on a computer, I could see the opcodes in their respective opcode lists.

Can I get the opcode lists without exporting into DNG data representation and then parsing the DNG file?

Answered by DTS Engineer in 908261022

Thanks for the clear description, and for checking the exported file with exiftool, which told me exactly what to look for.

None of the APIs I tried returned the opcode lists. I tested on an iPhone running iOS 27.0, with Bayer RAW and Apple ProRAW captures from the back wide-angle, ultra wide, and telephoto cameras. ImageIO declares kCGImagePropertyDNGOpcodeList1, kCGImagePropertyDNGOpcodeList2, and kCGImagePropertyDNGOpcodeList3, but none of those keys appeared in:

The metadata dictionary did contain one opcode's parameters. For Bayer RAW captures from the ultra wide camera, its DNG dictionary contained kCGImagePropertyDNGFixVignetteRadial. The values matched the FixVignetteRadial opcode in the capture's OpcodeList3.

If you'd like a supported way to get the opcode lists from a capture, please file an enhancement request using Feedback Assistant describing your use case. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Accepted Answer

Thanks for the clear description, and for checking the exported file with exiftool, which told me exactly what to look for.

None of the APIs I tried returned the opcode lists. I tested on an iPhone running iOS 27.0, with Bayer RAW and Apple ProRAW captures from the back wide-angle, ultra wide, and telephoto cameras. ImageIO declares kCGImagePropertyDNGOpcodeList1, kCGImagePropertyDNGOpcodeList2, and kCGImagePropertyDNGOpcodeList3, but none of those keys appeared in:

The metadata dictionary did contain one opcode's parameters. For Bayer RAW captures from the ultra wide camera, its DNG dictionary contained kCGImagePropertyDNGFixVignetteRadial. The values matched the FixVignetteRadial opcode in the capture's OpcodeList3.

If you'd like a supported way to get the opcode lists from a capture, please file an enhancement request using Feedback Assistant describing your use case. If you file the request, please post the Feedback number here so we can make sure it gets routed to the right team.

Please note that filing an enhancement request does not guarantee Apple will add any requested functionality to Apple products in the future. However, with that said, filing an enhancement request is a good way to get your ideas in front of the folks who make decisions about that sort of thing.

If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?

Thanks for looking into this and confirming there is currently no way to access this information via Apple's APIs. If I will get to filing an enhancement request, I will post the case number here.