Author Topic: Problem with Nikon ViewNX after using Exiftool  (Read 3072 times)

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 468
    • A selection of Alan Clifford's photographs
Problem with Nikon ViewNX after using Exiftool
« on: August 05, 2010, 04:09:30 PM »
Hello, I've got a bit of a problem.

I am posting this both to the Exiftool forum and to Nikon support.

The problem seems to be that after I have used exiftool to update a few fields, and then
use NikonviewNX to input a title (this normally updates the IPTC Object name and the XMP
title), NikonViewNX destroys the jpeg.  This is a very intermittent problem, it never
happened before yesterday but affected about three photos in an album of about 100.


The final exif data appears to consist of:

Code: [Select]
ExifTool Version Number         : 8.27
File Name                       : dsc_6725_afternikonview.jpg
Directory                       : .
File Size                       : 5.3 MB
File Modification Date/Time     : 2010:08:05 17:13:55+01:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Warning                         : Bad IFD0 offset for Make
Orientation                     : Horizontal (normal)
Resolution Unit                 : inches
Y Cb Cr Positioning             : Centered

First a question.  Do either of you share anything with the Gimp as I installed a new
version of that?  This is an a Mac running Snow Leopard 10.6.4.

This is the process I use.  Each of the following files are about 5MB each in size and the
server is slow if you want to download them.

Start with a raw file:

http://clifford.ac/~alan/nikonviewproblem/dsc_6725.nef


Use Nikonviewnx to generate a jpeg

http://clifford.ac/~alan/nikonviewproblem/dsc_6725.jpg


Use exiftool to add various fields (see below for additional information)

http://clifford.ac/~alan/nikonviewproblem/dsc_6725_afterexiftool.jpg


I can view that in nikonviewnx without any problem but when I add a title and click
"apply", all the information disappears from the meta data box, and the photograph
disappears and is replaced by the words "Unsupported file type".

http://clifford.ac/~alan/nikonviewproblem/dsc_6725_afternikonview.jpg


For comparison, the result of the above process normally results in a file such as this

http://clifford.ac/~alan/nikonviewproblem/usuallyok.jpg



------------------


Additional information

exiftool is used in a script to add the following fields:


 exiftool -m -P  -gpslatitude=${gpslatitude} -gpslatituderef=${gpslatituderef} \
      -gpslongitude=${gpslongitude}  -gpslongituderef=${gpslongituderef} \
      -gpsaltitude=${gpsaltitude} -gpsaltituderef=${gpsaltituderef} \
      -gpsdatestamp=${gpsdatestamp} \
      -gpstimestamp=${gpstimestamp} \
      -overwrite_original \
      "${photofiles[$ctr2]}"  >&2
   

exiftool -m -P -artist="${ARTIST}" \
    -creator="${ARTIST}" \
    -by-line="${ARTIST}" \
    -creatorworkemail="${EMAIL}" \
    -creatorworkurl="${WWW}" \
    -usageterms="${USAGETERMS}" \
    -copyright="${COPYRIGHT}${copyrightdate}" \
    -copyrightnotice="${COPYRIGHT}${copyrightdate}" \
    -rights="${COPYRIGHT}${copyrightdate}" \
    -overwrite_original \
    "${photofiles[$ctr2]}" >&2




Alan Clifford

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16658
    • ExifTool Home Page
Re: Problem with Nikon ViewNX after using Exiftool
« Reply #1 on: August 06, 2010, 07:59:10 AM »
Hi Alan,

Thanks for the detailed report and samples.

The problem is a bug in Nikon NX which can't seem to handle the situation where there is too much metadata to fit inside the APP1 EXIF JPEG segment.  The biggest culpret is the 45kB PreviewImage, so this problem is easily avoided by adding -previewimage= to your exiftool command line.

You should report this bug to Nikon, but good luck in getting it fixed. ;)

I should really charge money for debugging other software. :)

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

Alan Clifford

  • ExifTool Freak
  • *****
  • Posts: 468
    • A selection of Alan Clifford's photographs
Re: Problem with Nikon ViewNX after using Exiftool
« Reply #2 on: August 06, 2010, 11:12:18 AM »
Phil, thanks very much for the reply and the effort you have made.

I wasn't getting very far with Nikon and their attitude to the problem was appalling.  I have passed on your analysis and suggested you are owed a consultancy fee.

Alan