Write OpcodeList1 with binary file

Started by flz47655, October 19, 2023, 08:55:26 PM

Previous topic - Next topic

flz47655

Hello,
I wrote a small C# program to generate the opcode bytes for the OpcodeList1 DNG Tag, but I can't write the tag with the command:

exiftool.exe -v "-OpcodeList1<=data.bin" myfile.dng
nothing is written and I get this message:

QuoteWarning: Can't convert value for SubIFD:OpcodeList1 (no PrintConvInv)
Nothing to do.

Is possible to update this tag?

The data.bin is simply made by the list header (4 bytes) and the FixVignetteRadial command (72 bytes).
Attached the C# source and the binary file.

Thank you,
Leonardo

Phil Harvey

You should be writing the "numerical" value by adding the -n option to your command.  Or by using "-OpcodeList1#<=data.bin"

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

flz47655

Hello Phil,
I tried to add -n by I get the same result. This is the verbose output:

Quote======== myfile.dng
Rewriting myfile.dng...
  Editing tags in: IFD0 SubIFD TIFF
  FileType = DNG
  FileTypeExtension = DNG
  MIMEType = image/x-adobe-dng
  Rewriting IFD0
  Rewriting XMP
  Rewriting ExifIFD
  Copying 2448 image data blocks
Nothing changed in myfile.dng
    0 image files updated
    1 image files unchanged

Thank you,
Leonardo

Phil Harvey

Hi Leonardo,

Your command will write OpcodeList1 to SubIFD if it exists (this is the default location for OpcodeList1).  If there is no SubIFD then the command will do nothing.  If you want to write it somewhere else, then you must specify the location, eg "IFD0:OpcodeList1".

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

flz47655

By using IFD0 the command worked. Thanks again!

It's a pity that few softwares only (Adobe and C1) are honoring these Opcode commands. There are very useful for vigneting, etc. without the need for an external lens profile. The bundled Windows Raw codec, that's the base for many photo apps, seems that's not supporting my opcodes.