ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:53:55 AM

Title: Interaction between ExifTool and PSCS2 for NEF derived images.
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by ferdinandparis on 2006-06-25 05:26:05-07]

I have encountered an unfortunate interaction between ExifTool and PSCS2.

This problem occurs when using ExifTool to copy EXIF from .NEF source images to either .JPG & .TIF target images.  It does not seem to happen with .CRW-derived images.

If I convert a .NEF to .JPG using ACR, it is missing the maker notes. I can copy the EXIF data to it successfully using ExifTool and restore the maker notes.

If I now edit it in PSCS2, then it is again missing the maker notes. However if now I try to restore them again, ExifTool with fail with the error message:

"Warning: Entries in IFD0 were out of sequence. Fixed. - xxx.jpg |
 Error: Truncated SubIFD directory - xxx.jpg | 0 image files updated |
1 files weren't updated due to errors"


As a further test, I reconverted the .NEF to .JPG. Before I copied any EXIF, I edited it in PSCS2. ExifTool was able to successfully copy the EXIF data from the .NEF to the edited .JPG.

However if I again edit the image in PSCS2, and then try and copy the EXIF again using ExifTool, then the second EXIF copy using ExifTool will fail.

So, here is the conclusion. For images derived from a (D200) .NEF, once you've copied the EXIF data from the .NEF to the derived image, then any further editing in PSCS2 will mean that you can't copy the EXIF using ExifTool any more, unless you first using ExifTool to wipe the existing EXIF from the derived image using:

"exiftool -exif:all= xxx.jpg"

It's not clear whether this is a problem with ExifTool, or PSCS2.

If I must wipe the EXIF from the target image first, is there ExifTool syntax which will wipe the EXIF from the target image and then copying EXIF from the source to the target, all in one call to ExifTool?

Regards and thanks for a brilliant script.

Ferdinand
Title: Re: Interaction between ExifTool and PSCS2 for NEF derived images.
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by exiftool on 2006-06-25 11:51:00-07]

Hi Ferdinand,

Thanks for this report.  I don't have PSCS2, so I can't reproduce this problem myself,
but if you could send me a sample image (that gives the error when you try to write
with ExifTool) I should be able to figure out what is going wrong.  You can email it
to philharvey66 at gmail.com.  Thanks.  Also, what command line did you use to copy
the information to the JPEG?  I'm not sure what a JPEG image is doing with SubIFD
information.  This is unusual.

Currently there is no way to delete information and add the deleted information back
in one step (because the delete takes precedence over the added information).  But this
is on my wish list of abilities to add.

- Phil
Title: Re: Interaction between ExifTool and PSCS2 for NEF derived images.
Post by: Archive on May 12, 2010, 08:53:55 AM
[Originally posted by exiftool on 2006-06-27 13:15:45-07]

Thanks for the sample image, and for helping with testing.

I have released ExifTool 6.26 which fixes this problem.

The problem was that ExifTool created a SubIFD in the JPEG image when copying all tags from an NEF image using "-all:all".  This does not happen unless "-all:all" is used because then ExifTool is free to write the information to its preferred location rather than the same location as in the original.  Technically a SubIFD shouldn't be exist in the JPEG EXIF information, and apparently PSCS2 doesn't know how to handle this properly because the SubIFD information is corrupted after editing with PSCS2.

The solution was to prevent ExifTool from adding a new SubIFD to an image.  The SubIFD is used to store alternate-resolution images in TIFF and some RAW images, but is not normally used in JPEG images.

I suggest upgrading to ExifTool 6.26 or later if you are copying information from any image containing a SubIFD to a JPEG image with "-all:all".  SubIFD information may exist in TIFF images and the following RAW formats: NEF, PEF, DNG, RAF, ERF and SR2.  (Note that CR2, ORF or SRF images do not contain a SubIFD even though they are TIFF-based.)