Can't add/change PanasonicRaw Distortion information

Started by wak, July 12, 2022, 05:38:33 PM

Previous topic - Next topic

wak

Hello,

I have a Leica D-Lux 7 camera and I'm trying to duplicate the DistortionCorrection information from one DNG file to another. Trying to copy these parameters from one DNG file (which has them) to another (which doesn't have them) failed. So I decided to first try something simpler: change an existing DistortionCorrection parameter from "on" to "off". It should be simple, but I can't get it to work. I can successfully make this change in the original RWL raw file, and see the effect of the change in Capture One (image is displayed either distorted or not depending on whether the value is "on" or "off"). However, I need this to be done in a DNG file. So I have converted the RWL file to DNG using Adobe DNG Converter. I can see the Distortion information in the DNG file in the PanasonicRaw group, but I'm unable to change their values. Below are the results of three EXIFTOOL commands:

a) display current value of PanasonicRaw:DistortionCorrection => should be "on" and that's what it is showing

b) change the value to "off"; EXIFTOOL says it changed the image file

c) display new value; it should be "off", but still shows "on". There is also no change in Capture One when displaying the image


Any help as to how I can make this work would be very much appreciated.

Thanks,
Wilfried

---------- EXIFTOOL command results ------------

a) WAKpro:other focal lengths WAK$ exiftool  -PanasonicRaw:DistortionCorrection '_1271283 DNGConv.dng'
Distortion Correction           : On

b) WAKpro:other focal lengths WAK$ exiftool  -v2 -DistortionCorrection=off '_1271283 DNGConv.dng'
Writing PanasonicRaw:DistortionCorrection if tag exists
Writing CanonVRD:DistortionCorrection if tag exists
Writing Canon:DistortionCorrection if tag exists
Writing Olympus:DistortionCorrection if tag exists
Writing Pentax:DistortionCorrection if tag exists
Writing SubIFD:DistortionCorrection
Warning: Can't convert Sony:DistortionCorrection (not in PrintConv)
======== _1271283 DNGConv.dng
Rewriting _1271283 DNGConv.dng...
  Editing tags in: CanonVRD ExifIFD IFD0 MakerNotes PanasonicRaw SubIFD TIFF
  Creating tags in: IFD0 SubIFD TIFF
  FileType = DNG
  FileTypeExtension = DNG
  MIMEType = image/x-adobe-dng
  Rewriting IFD0
  Rewriting SubIFD
    - SubIFD:DistortionCorrection = '0'
    + SubIFD:DistortionCorrection = '0'
  Rewriting SubIFD1
  Rewriting XMP
  Rewriting ExifIFD
  Rewriting DNGAdobeData
  Rewriting AdobePano
  Copying 268 image data blocks
    1 image files updated


c) WAKpro:other focal lengths WAK$ exiftool  -PanasonicRaw:DistortionCorrection '_1271283 DNGConv.dng'
Distortion Correction           : On
WAKpro:other focal lengths WAK$


StarGeek Edit: Edited to correct formatting.  Please use the button for commands and button for sample exiftool output.







wak

#1
In my original example I didn't include the PanasonicRaw group in the modify command, so I ran it again. It still doesn't actually change the file :-(
Any help would be greatly appreciated.

exiftool  -v3 -PanasonicRaw:DistortionCorrection=off '_1271283 DNGConv.dng'
Writing PanasonicRaw:DistortionCorrection
======== _1271283 DNGConv.dng
Rewriting _1271283 DNGConv.dng...
  Editing tags in: PanasonicRaw
  Creating tags in: PanasonicRaw
  FileType = DNG
  FileTypeExtension = DNG
  MIMEType = image/x-adobe-dng
  Rewriting IFD0
  Rewriting SubIFD
  Rewriting SubIFD1
  Rewriting XMP
  Rewriting ExifIFD
  Rewriting DNGAdobeData
  Rewriting AdobePano
  Copying 268 image data blocks
Nothing changed in _1271283 DNGConv.dng
    0 image files updated
    1 image files unchanged

Phil Harvey

It looks like ExifTool doesn't write Panasonic tags in DNG images.  I would need a sample to be able to say why, but it may be a while before I can look into this.

- 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 ($).

wak

Thanks Phil, I appreciate it. I sent you a PM with the file location.

Wilfried

Phil Harvey

Hi Wilfried,

The Panasonic maker notes in the DNG file have been mutilated into Adobe's proprietary makernote format which ExifTool doesn't yet have the ability to edit.

So your only option here is to copy the entire Adobe makernote data as a block from one file to another.  Try this:

exiftool -tagsfromfile "has DistortionInfo.dng" -dngadobedata "Needs DistortionInfo.dng"

- 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 ($).

wak

Hi Phil,

I tried your suggested command on multiple samples and all the PanasonicRaw data transfers over.

Thanks for your help!
Wilfried