DNG OpCodeList

Started by wu, August 16, 2022, 08:55:58 AM

Previous topic - Next topic

wu

Hello, I want to extract and modify the opcodelist metadata content of images in DNG format. Can exiftool do this? If so what should I do?

StarGeek

Exiftool cannot edit the OpcodeList tags, but you can extract the it with a command such as
exiftool -b -OpcodeList1 file.dng >file.opcode

And then after you edit it, re-import it with
exiftool "-OpcodeList1<=file.opcode" file.dng

Make sure you figure out which OpcodeList you want to edit, as there can be three different ones.  Use the command in FAQ #3 to see all tags including duplicates.

This is not something I can test to be certain it works, but this would be the general idea of the command.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

wu

Thank you very much for your reply!
But after this command is executed, some errors will be reported:
"
Waring:cannot convert value for subIFD:opcodelist3 (no PrintConvInv)
Nothing to do.
"
Maybe you know why? Greatful

If I use the new command:

exiftool -OpcodeList1<=file.opcode file.dng

It will output something like this:
"
Opcodelist3:GainMap,WarpRectilinear
"

without writing the content to the DNG file

StarGeek

Is that the exact command you used?  Because your example is missing the required quotes.

Copy paste the exact command and the exact output here.  "something like" is not useful when trying to figure out the problem.

If you're using Windows, to copy text you drag across all the text and then right click


Then use the Code Button when you paste the text.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

You must use the -n option when writing OpcodeList, or add a "#" to the tag name:

exiftool "-OpcodeList1#<=file.opcode" file.dng
This is because there is a print conversion done when reading which results in a loss of information, so you must write the unconverted value.  I'll fix the documentation to reflect this (the "Writable" column should have a "~" to indicate this).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).