ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: flz47655 on October 19, 2023, 08:55:26 PM

Title: Write OpcodeList1 with binary file
Post by: flz47655 on October 19, 2023, 08:55:26 PM
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
Title: Re: Write OpcodeList1 with binary file
Post by: Phil Harvey on October 19, 2023, 09:06:26 PM
You should be writing the "numerical" value by adding the -n option to your command.  Or by using "-OpcodeList1#<=data.bin"

- Phil
Title: Re: Write OpcodeList1 with binary file
Post by: flz47655 on October 20, 2023, 04:18:47 AM
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
Title: Re: Write OpcodeList1 with binary file
Post by: Phil Harvey on October 20, 2023, 11:07:04 AM
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
Title: Re: Write OpcodeList1 with binary file
Post by: flz47655 on October 20, 2023, 01:10:11 PM
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.