exiftool error after using exiftran on Nikon jpg picture

Started by Archive, May 12, 2010, 08:53:53 AM

Previous topic - Next topic

Archive

[Originally posted by chrichri on 2006-04-21 20:30:51-07]

Hi,

I am wondering if anybody came across the following problem:

After using 'exiftran -ai *.jpg' on my Nikon D70s pictures

to rotate them according to the orientation tag exiftool

does not work on the jpg's anymore. Instead it prints the

following error message if I try e.g. to correct the Date-

TimeOriginal:

Code:
chris@x-bone:/tmp> exiftool -v3 -ExifIFD:DateTimeOriginal+=5 test.jpg
Shifting ExifIFD:DateTimeOriginal if tag already exists
Rewriting test.jpg...
  Editing tags in: APP1 ExifIFD IFD0
  Creating tags in:
JPEG APP0 (14 bytes):
    0000: 4a 46 49 46 00 01 01 00 00 01 00 01 00 00       [JFIF..........]
JPEG APP1 (10876 bytes):
    0000: 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 0a [Exif..MM.*......]
    0010: 01 0f 00 02 00 00 00 12 00 00 00 86 01 10 00 02 [................]
    0020: 00 00 00 0b 00 00 00 98 01 12 00 03 00 00 00 01 [................]
    0030: 00 01 00 00 01 1a 00 05 00 00 00 01 00 00 00 a4 [................]
    0040: 01 1b 00 05 00 00 00 01 00 00 00 ac 01 28 00 03 [.............(..]
    0050: 00 00 00 01 00 02 00 00 01 31 00 02 00 00 00 0a [.........1......]
    0060: 00 00 00 b4 01 32 00 02 00 00 00 14 00 00 00 be [.....2..........]
    [snip 10764 bytes]
  Rewriting IFD0
  Rewriting ExifIFD
  Warning = Entries in ExifIFD were out of sequence. Fixed.
    - DateTimeOriginal = '2006:04:15 12:57:17'
    + DateTimeOriginal = '2006:04:15 17:57:17'
  Rewriting MakerNotes
  Rewriting NikonPreview
  Error = Truncated NikonPreview directory
  Rewriting InteropIFD
  Rewriting IFD1
  Warning = Entries in IFD1 were out of sequence. Fixed.
JPEG DQT (65 bytes):
JPEG DQT (65 bytes):
JPEG SOF0:
JPEG DHT (29 bytes):
JPEG DHT (179 bytes):
JPEG DHT (29 bytes):
JPEG DHT (179 bytes):
JPEG SOS (end of parsing)
Warning: Entries in ExifIFD were out of sequence. Fixed. - test.jpg
Error: Truncated NikonPreview directory - test.jpg
    0 image files updated
    1 files weren't updated due to errors

On pictures I didn't alter with exiftran exiftool works like expected.

I do not have much knowledge of exif. Any useful hint is most welcome.

Thanks, Chris.

Archive

[Originally posted by exiftool on 2006-04-22 00:03:18-07]

Hi Chris,

Your exiftran software has corrupted the maker notes of your image.  Unfortunately, the corruption affects the structure of the maker notes in such a way that ExifTool can no longer copy it properly, so it issues an error and won't write to the image.

This sort of a problem should always be fatal in the EXIF information, but I may be able to allow ExifTool to rewrite maker notes like this if I can do it without causing further damage.  If so, I could make this a minor error which would allow you to use the -m option to downgrade this to a warning (enabling you to write to these images).

But the bad news is that I'm leaving on a one or two week vacation tomorrow, so this work won't get done until I return.  I will look into this when I get back.

- Phil

Archive

[Originally posted by exiftool on 2006-05-03 14:06:39-07]

OK.  I've changed ExifTool so that most EXIF write errors that occur in the maker notes are now minor, allowing them to be ignored with the "-m" option.  Note that ignoring an error like this will result in a loss of some maker note information (in your case, the Nikon preview image will be lost).  This change will appear in ExifTool 6.16 when it is released.  I have made a 6.16 pre-release available here for testing.

Archive

[Originally posted by idallen on 2006-09-02 14:33:38-07]


What software will rotate a JPEG (lossless) without corrupting it or
losing the EXIF data, so that programs like exiftool won't have to
compensate?

Exiftran takes an "EXIF 2.2" file and mangles it into a "JFIF 1.01" file:

Code:
$ file 2006-08-10_21-38-36.jpg.bak
2006-08-10_21-38-36.jpg.bak: JPEG image data, EXIF standard 2.2

$ file 2006-08-10_21-38-36.jpg
2006-08-10_21-38-36.jpg: JPEG image data, JFIF standard 1.01

Not very "lossless" at all!

Archive

[Originally posted by exiftool on 2006-09-02 18:45:51-07]

Honestly, I don't think there is anything out there that will properly preserve the (non-standard) makernote information.  However, one would expect all standard EXIF information to be preserved by an application such as exiftran.  They should be contacted if it isn't.

However, ExifTool can always be used to reconstruct the information from the original file:

Code:
exiftool -tagsfromfile 2006-08-10_21-38-36.jpg.bak -all:all 2006-08-10_21-38-36.jpg

- Phil