Unable to remove OpCodeList2 opcodes from DNG

Started by horshack, February 08, 2024, 12:27:43 PM

Previous topic - Next topic

horshack

I have a Sony A7rIV raw converted to DNG that I'm attempting to remove the lens correction profiles from. I'm able to remove the OpcodeList3 entries but not OpcodeList2 - exiftool seems to ignore the request. It reports the OpcodeList2 entries even after attempting deletion.

Command line:
exiftool -OpCodeList2= -OpCodeList3= -overwrite_original Sony_A7rIV_20mm.dng

I tried a few older DNG conversions/versions of the same file and see the same behavior.

Here's a link to a DNG that this can be reproduced with: Sony_A7rIV_20mm.dng (Google Drive)

StarGeek

If you look at the file with the command in FAQ #3 (limiting it to just OpcodeList* tags), you will see that there are multiple OpcodeList2, but they are in locations other than SubIFD
C:\>exiftool -G1 -a -s -op* Y:\!temp\x\y\z\Sony_A7rIV_20mm.dng
[SubIFD]        OpcodeList3                     : WarpRectilinear
[SubIFD2]       OpcodeList2                     : MapPolynomial, MapPolynomial, MapPolynomial
[SubIFD3]       OpcodeList2                     : MapPolynomial, MapPolynomial, MapPolynomial
[SubIFD4]       OpcodeList2                     : MapPolynomial, MapPolynomial, MapPolynomial

By default, exiftool will not remove the tag from locations other than the main SubIFD.  To remove these, you need to include the exact group
C:\>exiftool -P -overwrite_original -SubIFD2:OpcodeList2= Y:\!temp\x\y\z\Sony_A7rIV_20mm.dng
    1 image files updated

C:\>exiftool -G1 -a -s -op* Y:\!temp\x\y\z\Sony_A7rIV_20mm.dng
[SubIFD]        OpcodeList3                     : WarpRectilinear
[SubIFD3]       OpcodeList2                     : MapPolynomial, MapPolynomial, MapPolynomial
[SubIFD4]       OpcodeList2                     : MapPolynomial, MapPolynomial, MapPolynomial

C:\>exiftool -P -overwrite_original -SubIFD3:OpcodeList2= -SubIFD4:OpcodeList2= Y:\!temp\x\y\z\Sony_A7rIV_20mm.dng
    1 image files updated

C:\>exiftool -G1 -a -s -op* Y:\!temp\x\y\z\Sony_A7rIV_20mm.dng
[SubIFD]        OpcodeList3                     : WarpRectilinear
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype