Nikon Adjustments Files (.nka)

Started by blue-j, April 21, 2024, 07:42:58 PM

Previous topic - Next topic

blue-j

Wondering if it's possible to recognize .nka files (sample attached)?  They all start with:

4E 49 4B 4F 4E 41 44 4A
NIKONADJ

the format is quite readable largely, but just getting ExifTool to recognize it would be helpful.  I have not has luck trying to make a custom config to recognize them.

- J

Phil Harvey

Sorry for the delay in finding time for this.

I'll add support for reading this file format in ExifTool 12.85, and give it a MIME type of "application/x-nikon-nxstudio" if that makes sense.

While I'm at it, I'll also add support for NXD files from Nikon Capture NX-D.

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

blue-j

thank you Phil!  this is a sweet add.  - J

blue-j

i would call the file type "Nikon NX Studio Adjustments" instead of "Nikon NX Studio Settings" just because it is called "Adjustments" in the UI, and that is also what the "A" stands for in NKA.  - J

Phil Harvey

OK, I'll make that change in 12.89

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

blue-j

we have to parse the file over here, and i do not think that is something you want to do?  the attempts by exiftool presently are not accurate, but i know that XML is a mess.  in case it's useful at all, this is the structure they are using for the tags:

<userData>

  <filter id="nikon::DynamicRange">
    <active>true</active>
    <parameters>
      <integer name="mode">0</integer>
    </parameters>
  </filter>

  <filter id="nikon::DLightingHS">
    <active>true</active>
    <parameters>
      <highlightAdjustment>20</highlightAdjustment>
      <colorBoost>60</colorBoost>
    </parameters>
  </filter>

  <filter id="nikon::PictureControl">
    <active>true</active>
    <parameters>
      <Export>
        <ExportData>TkNQAAAAAQAAAAAEMDMxMAAAAgAAAAAURFJFQU0AAAAAAAAAAAAAAAAAAAAA AAMAAAAAAggBAAAEAAAAAAIAAAAABQAAAAAC/wEAAAYAAAAAAn4EAAAHAAAA AAJ8BAAACAAAAAACgAQAAAkAAAAAAv8EAAAKAAAAAAKABAAACwAAAAACgAQA AAwAAAAAAv8AAAANAAAAAAL/AAAADgAAAAAC/wQAAA8AAAAAAv8BAAAQAAAA AAL/AQAAEQAAAAAC/wEAABIAAAAAAv8BAAATAAAAAAL/AQAAFAAAAAACgAEA ABUAAAAAAooKAAAWAAAAAAJ8BAAAFwAAAAACgAQAABgAAAAAAoAEAAAZAAAA AAKAAQAAGgAAAAACgAEAABsAAAAAAoABAAAcAAAAAAKAAQAAHQAAAAACgAEA AB4AAAAAAoABAAAfAAAAAByAgICAgICAgICAgICAgICAgICAgICAgIABAQEA AAAgAAAAABSAAICAgACAgIAAgIABAQEAsgGAAQAAAAA=</ExportData>
        <ExportDataSize>533</ExportDataSize>
      </Export>
      <SelectedPictureControl>0</SelectedPictureControl>
      <AutoContrast>255</AutoContrast>
      <AutoSaturation>255</AutoSaturation>
      <SelectedPictureControlVersion2>0</SelectedPictureControlVersion2>
      <SavedPicConProcess>1</SavedPicConProcess>
      <PictureControl>14</PictureControl>
    </parameters>
  </filter>

  <filter id="nikon::EasySharpening">
    <active>true</active>
    <parameters>
      <EasySharpening>32</EasySharpening>
    </parameters>
  </filter>

  <filter id="Nikon::FishEye">
    <active>false</active>
    <parameters>
      <EmptyAreas>false</EmptyAreas>
      <FillColor>3</FillColor>
      <Version>2</Version>
    </parameters>
  </filter>

  <filter id="nikon::Flare">
    <active>false</active>
    <parameters>
      <integer name="flare">0</integer>
    </parameters>
  </filter>

  <filter id="nikon::SkinTone">
    <active>false</active>
    <parameters>
      <integer name="faceColorHue">128</integer>
      <integer name="faceColorHueStep">4</integer>
      <integer name="faceColorBrigntness">128</integer>
      <integer name="faceColorBrigntnessStep">4</integer>
    </parameters>
  </filter>

  <filter id="nikon::Vignette">
    <active>true</active>
    <parameters>
      <integer name="intensity">133</integer>
    </parameters>
  </filter>

  <filter id="nikon::Perspective">
    <active>true</active>
    <parameters>
      <integer name="horizontalAngle">8</integer>
      <integer name="verticalAngle">4</integer>
    </parameters>
  </filter>

  <filter id="nikon::ChrAb">
    <active>true</active>
    <parameters />
  </filter>

  <filter id="nikon::UnsharpMask">
    <active>true</active>
    <parameters>
      <stringarray name="USM.lb.value">
        <entry>@'%s, 51%, 5%, 0', @USM.ipm.USM.cbColor0</entry>
        <entry>@'%s, 44%, 5%, 0', @USM.ipm.USM.cbColor4</entry>
        <entry>@'%s, 33%, 73%, 88', @USM.ipm.USM.cbColor1</entry>
      </stringarray>
    </parameters>
  </filter>

  <filter id="nikon::ColorBooster">
    <active>true</active>
    <parameters>
      <integer name="ColorBooster.active">1</integer>
      <integer name="ColorBooster.chkMethod">0</integer>
      <integer name="ColorBooster.slLevel">28</integer>
    </parameters>
  </filter>

  <filter id="nikon::SkinSoftening">
    <active>false</active>
    <parameters>
      <type>0</type>
    </parameters>
  </filter>

  <filter id="nik::LevelsCurves">
    <active>true</active>
    <parameters>
      <double name="Curves.luminance.ymax">1</double>
      <double name="Curves.luminance.ymin">0</double>
      <double name="Curves.luminance.black">0</double>
      <double name="Curves.luminance.gammaVal">1</double>
      <double name="Curves.luminance.white">1</double>
      <points name="Curves.luminance.pointsOut">
        <pointOfPoints x="0" y="0" />
        <pointOfPoints x="0.59034633636474609" y="0.54586625099182129" />
        <pointOfPoints x="1" y="1" />
      </points>
      <double name="Curves.red.ymax">1</double>
      <double name="Curves.red.ymin">0</double>
      <double name="Curves.red.black">0</double>
      <double name="Curves.red.gammaVal">1</double>
      <double name="Curves.red.white">1</double>
      <points name="Curves.red.pointsOut">
        <pointOfPoints x="0" y="0" />
        <pointOfPoints x="1" y="1" />
      </points>
      <double name="Curves.green.ymax">1</double>
      <double name="Curves.green.ymin">0</double>
      <double name="Curves.green.black">0</double>
      <double name="Curves.green.gammaVal">1</double>
      <double name="Curves.green.white">1</double>
      <points name="Curves.green.pointsOut">
        <pointOfPoints x="0" y="0" />
        <pointOfPoints x="1" y="1" />
      </points>
      <double name="Curves.blue.ymax">1</double>
      <double name="Curves.blue.ymin">0</double>
      <double name="Curves.blue.black">0</double>
      <double name="Curves.blue.gammaVal">1</double>
      <double name="Curves.blue.white">1</double>
      <points name="Curves.blue.pointsOut">
        <pointOfPoints x="0" y="0" />
        <pointOfPoints x="1" y="1" />
      </points>
    </parameters>
  </filter>

  <filter id="nikon::RedEye">
    <active>true</active>
    <parameters>
      <integer name="CrntMode">1</integer>
      <bool name="KeepAutoRegions">false</bool>
      <redeyelists name="AutoLists" />
      <redeyelists name="OneClickLists" />
    </parameters>
  </filter>

  <filter id="nikon::Diffraction">
    <active>true</active>
    <parameters />
  </filter>
  <filter id="
  nikon::Distortion">
    <active>true</active>
    <parameters>
      <auto>true</auto>
      <type>0</type>
    </parameters>
  </filter>

  <filter id="nikon::ApplicationData">
    <active>true</active>
    <parameters>
      <data id="app:CNkvEditActiveDLighting:State">1</data>
      <data id="app:CNkvEditActiveDLighting:Type">2</data>
      <data id="app:CNkvEditChrAb:Check">true</data>
      <data id="app:CNkvEditChrAb:State">1</data>
      <data id="app:CNkvEditDiffraction:Check">true</data>
      <data id="app:CNkvEditDiffraction:State">1</data>
      <data id="app:CNkvEditDistortion:Check">true</data>
      <data id="app:CNkvEditDistortion:State">1</data>
      <data id="app:CNkvEditDistortion:Type">2</data>
      <data id="app:CNkvEditDustOff:Check">false</data>
      <data id="app:CNkvEditDustOff:State">1</data>
      <data id="app:CNkvEditLngChrAb:Check">true</data>
      <data id="app:CNkvEditLngChrAb:State">1</data>
      <data id="app:CNkvEditMoire:Check">true</data>
      <data id="app:CNkvEditMoire:State">1</data>
      <data id="app:CNkvEditNoiseReduction:AstroCheck">true</data>
      <data id="app:CNkvEditNoiseReduction:ColorCheck">true</data>
      <data id="app:CNkvEditNoiseReduction:ColorCheck:Enable">true</data>
      <data id="app:CNkvEditNoiseReduction:ColorIntensity1">3</data>
      <data id="app:CNkvEditNoiseReduction:ColorMethod">8</data>
      <data id="app:CNkvEditNoiseReduction:ColorMode">2</data>
      <data id="app:CNkvEditNoiseReduction:EdgeCheck">true</data>
      <data id="app:CNkvEditNoiseReduction:PixelShiftCheck">false</data>
      <data id="app:CNkvEditNoiseReduction:State">1</data>
      <data id="app:CNkvEditSharpness:Check">true</data>
      <data id="app:CNkvEditSharpness:State">1</data>
      <data id="app:CNkvEditSharpness:Type">4</data>
      <data id="app:CNkvEditUnsharpMask:Check">true</data>
      <data id="app:CNkvEditUnsharpMask:State">1</data>
      <data id="app:CNkvEditVignette:Check">true</data>
      <data id="app:CNkvEditVignette:Intensity">133</data>
      <data id="app:CNkvEditVignette:State">1</data>
      <data id="app:orientation">0</data>
      <data id="app;CNkvColorBooster:State">1</data>
      <data id="app;CNkvColorBooster:Type">2</data>
    </parameters>
  </filter>

  <filter id="nikon::LongChrAb">
    <active>true</active>
    <parameters>
      <integer name="LongChrAb.Adjustment">68</integer>
    </parameters>
  </filter>

  <filter id="nikon::ExposureCompensation">
    <active>true</active>
    <parameters>
      <Gain>0.67000001668930054</Gain>
    </parameters>
  </filter>

  <filter id="nikon::Adl">
    <active>true</active>
    <parameters>
      <ActiveDLightingFilter>2</ActiveDLightingFilter>
    </parameters>
  </filter>

  <filter id="nikon::ColorMode">
    <active>true</active>
    <parameters>
      <ApplyToneCurve>true</ApplyToneCurve>
      <ToneCurve>0</ToneCurve>
      <ApplyColorMode>true</ApplyColorMode>
      <ColorReproductionMode>0</ColorReproductionMode>
      <ApplyHueAdjustment>true</ApplyHueAdjustment>
      <HueAdjustment>3</HueAdjustment>
      <ApplySharpening>true</ApplySharpening>
      <Sharpening>0</Sharpening>
      <ApplySaturationAdjustment>true</ApplySaturationAdjustment>
      <SaturationAdjustment>0</SaturationAdjustment>
      <ApplyDigitalColorEffectFilter>true</ApplyDigitalColorEffectFilter>
      <DigitalColorEffectFilter>0</DigitalColorEffectFilter>
    </parameters>
  </filter>

  <filter id="nik::LCH">
    <active>true</active>
    <parameters>
      <double name="LCHEditor.master.ymax">0.89680629968643188</double>
      <double name="LCHEditor.master.ymin">0</double>
      <double name="LCHEditor.master.black">0</double>
      <double name="LCHEditor.master.gammaVal">0.44999998807907104</double>
      <double name="LCHEditor.master.white">0.99547696113586426</double>
      <points name="LCHEditor.master.pointsOut">
        <pointOfPoints x="0" y="0" />
        <pointOfPoints x="0.54680055379867554" y="0.31468260288238525" />
        <pointOfPoints x="0.99547696113586426" y="0.89680629968643188" />
      </points>
      <binary name="nik.LUT.double.LCHEditor.color.pointWidth">0.448017</binary>
      <points name="LCHEditor.color.pointsOut">
        <pointOfPoints x="0.39787787199020386" y="0.27599161863327026" />
      </points>
      <binary name="nik.LUT.double.LCHEditor.croma.pointWidth">0.540822 0.212054 0.44557</binary>
      <integer name="LCHEditor.croma.offset">0</integer>
      <points name="LCHEditor.croma.pointsOut">
        <pointOfPoints x="0.26752102375030518" y="0.22958880662918091" />
        <pointOfPoints x="0.45588910579681396" y="0.60602682828903198" />
        <pointOfPoints x="0.74820679426193237" y="0.66294646263122559" />
      </points>
      <integer name="LCHEditor.croma.exclude">0</integer>
      <integer name="LCHEditor.hue.offset">0</integer>
      <binary name="nik.LUT.double.LCHEditor.hue.pointWidth">0.0963542 0.0637735</binary>
      <points name="LCHEditor.hue.pointsOut">
        <pointOfPoints x="0.46378153562545776" y="0.64453136920928955" />
        <pointOfPoints x="0.56108367443084717" y="0.59566032886505127" />
      </points>
    </parameters>
  </filter>

  <filter id="nikon::QuickFixContrast">
    <active>true</active>
    <parameters>
      <integer name="QuickFixContrast">13</integer>
    </parameters>
  </filter>

  <filter id="nikon::DustOff">
    <active>false</active>
    <parameters>
      <cameraType>1071</cameraType>
      <map>
        <mapSize>0</mapSize>
      </map>
      <dateAndTime>
        <year>1900</year>
        <month>1</month>
        <day>1</day>
        <hour>0</hour>
        <minute>0</minute>
        <second>0</second>
      </dateAndTime>
    </parameters>
  </filter>

  <filter id="nikon::Brightness">
    <active>true</active>
    <parameters>
      <brightness>-0.22000002861022949</brightness>
      <autoValue>0</autoValue>
      <enhancedBlack>false</enhancedBlack>
    </parameters>
  </filter>

  <filter id="nikon::ActiveDLighting">
    <active>true</active>
    <parameters>
      <integer name="ShadowProtection">37</integer>
      <integer name="ColorBoost">-50</integer>
      <integer name="LocalContrast">50</integer>
      <integer name="ColorBalance">50</integer>
      <integer name="ShadowTotalWidth">75</integer>
      <integer name="HighlightTotalWidth">25</integer>
      <integer name="HighlightProtection">12</integer>
    </parameters>
  </filter>

  <filter id="nikon::AstroNoiseReduction">
    <active>true</active>
    <parameters />
  </filter>

  <filter id="nikon::ColorNoiseReduction">
    <active>true</active>
    <parameters>
      <integer name="NoiseReduction.version">2</integer>
      <integer name="NoiseReduction.cbMethod">3</integer>
      <integer name="NoiseReduction.slIntensity">0</integer>
      <integer name="NoiseReduction.slSharpness">5</integer>
      <integer name="NoiseReduction.slIntensity2">0</integer>
      <integer name="NoiseReduction.slSharpness2">50</integer>
      <integer name="NoiseReduction.slChrIntensity2">0</integer>
      <integer name="NoiseReduction.slChrSharpness2">50</integer>
      <integer name="NoiseReduction.slIntensity3">3</integer>
      <integer name="NoiseReduction.nrtype">2</integer>
    </parameters>
  </filter>

  <filter id="nikon::EdgeNoiseReduction">
    <active>true</active>
    <parameters />
  </filter>

  <filter id="nikon::MoireNoiseReduction">
    <active>true</active>
    <parameters>
      <integer name="NoiseReduction.version">2</integer>
      <integer name="NoiseReduction.moire">3</integer>
    </parameters>
  </filter>

  <filter id="nikon::PixelShiftNoiseReduction">
    <active>true</active>
    <parameters />
  </filter>

</userData>

Phil Harvey

I try to stay away from XML unless necessary.  Adding support for each different format means another ugly patch to ExifTool.

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

blue-j

makes total sense.  it's a jungle.  - J