problem with exiftool in batch mode

Started by Archive, May 12, 2010, 08:54:34 AM

Previous topic - Next topic

Archive

[Originally posted by manni1 on 2009-05-04 09:27:06-07]

Hello Phil, I try to transfer EXIF-data from RAW to JPG in batch mode. The following batch file works properly with JPGs made with RawShooter (with no exifs written to the pictures):

exiftool -tagsfromfile ..%%d%%f.NEF  --orientation --software -software="RawShooter" -comment="mit RawShooter erzeugt" -copyright="Manfred" -ext JPG .

Now I changed to Photoshop Elements and have the problem, that PSE always writes Exif-data into the JPG-Files. I tried to delete them before the tagsfromfile-process with the following statement:

exiftool  -all=  -tagsfromfile ..%%d%%f.NEF   --orientation --software -software="Photoshop Elements 7" -comment="mit PSE 7 erzeugt" -copyright="Manfred" -ext JPG .

But this does not work. What's my fault?

Yours Manfred

Archive

[Originally posted by exiftool on 2009-05-04 12:12:14-07]

Hi Manfred,

When you say "this does not work", can you be more specific.  It works for me:

Code:
> exiftool -all= -tagsfromfile %d%f.NEF --orientation --software -software="Photoshop Elements 7" -comment="mit PSE 7 erzeugt" -copyright="Manfred" -v2 a.jpg

  Deleting tags in: * AFCP CIFF CanonVRD Ducky EXIF ExifIFD File FlashPix FotoStation GPS ICC_Profile IFD0 IPTC JFIF MIE MakerNotes Meta MetaIFD PDF PNG PhotoMechanic Photoshop PrintIM RMETA Trailer XML XML-* XML-* XMP XMP-* XMP-*
  Writing new tags after deleting groups: * AFCP CIFF CanonVRD Ducky EXIF ExifIFD File FlashPix FotoStation GPS ICC_Profile IFD0 IPTC JFIF MIE MakerNotes Meta MetaIFD PDF PNG PhotoMechanic Photoshop PrintIM RMETA Trailer XML XML-* XMP XMP-*
Writing PNG:Software
Writing MIE-Doc:Software
Writing Sigma:Software if tag exists
[...]
Writing Nikon:AFAperture if tag exists
Writing Nikon:AFAperture if tag exists
Rewriting a.jpg...
  Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF COM CanonVRD Comment Composite Ducky ExifIFD File FlashPix FotoStation GPS ICC_Profile IFD0 IFD2 IPTC JFIF KodakIFD MIE MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main MIE-Preview MakerNotes Meta MetaIFD PDF PNG PhotoMechanic Photoshop PostScript PrintIM RMETA SubIFD SubIFD1 SubIFD2 Trailer XML XML-* XMP
  Creating tags in: APP1 COM Comment Composite ExifIFD File IFD0 IFD2 KodakIFD MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main MIE-Preview PNG PostScript SubIFD SubIFD1 SubIFD2 XMP
JPEG APP1 (7978 bytes):
  Deleting APP1 EXIF segment
Creating APP1:
  Creating IFD0
  ExifByteOrder = MM
  Deleting IFD0
    + IFD0:Make = 'NIKON CORPORATION'
    + IFD0:Model = 'NIKON D70'
    + IFD0:XResolution = '300'
    + IFD0:YResolution = '300'
    + IFD0:ResolutionUnit = '2'
    + IFD0:Software = 'Photoshop Elements 7'
    + IFD0:ModifyDate = '2004:03:09 11:38:33'
    + IFD0:YCbCrPositioning = '1' (mandatory)
    + IFD0:ReferenceBlackWhite = '0 255 0 255 0 255'
    + IFD0:Copyright = 'Manfred'
  Creating ExifIFD
    + ExifIFD:ExposureTime = '0.0166666666666667'
    + ExifIFD:FNumber = '6.3'
    + ExifIFD:ExposureProgram = '3'
    + ExifIFD:ISO = '200'
    + ExifIFD:ExifVersion = '0220' (mandatory)
    + ExifIFD:DateTimeOriginal = '2004:03:09 11:38:33'
    + ExifIFD:CreateDate = '2004:03:09 11:38:33'
    + ExifIFD:ComponentsConfiguration = '1 2 3 0' (mandatory)
    + ExifIFD:ExposureCompensation = '0'
    + ExifIFD:MaxApertureValue = '3.16992500144231'
    + ExifIFD:MeteringMode = '2'
    + ExifIFD:LightSource = '0'
    + ExifIFD:Flash = '0'
    + ExifIFD:FocalLength = '105.0'
    + ExifIFD:MakerNoteNikon = 'Nikon..MM*.+...0210..................(....0....8....F.[snip]'
    + ExifIFD:UserComment = 'ASCII                                    '
    + ExifIFD:SubSecTime = '00'
    + ExifIFD:SubSecTimeOriginal = '00'
    + ExifIFD:SubSecTimeDigitized = '00'
    + ExifIFD:FlashpixVersion = '0100' (mandatory)
    + ExifIFD:ColorSpace = '65535' (mandatory)
    + ExifIFD:SensingMethod = '2'
    + ExifIFD:FileSource = '.'
    + ExifIFD:SceneType = '.'
    + ExifIFD:CFAPattern = '.....'
    + ExifIFD:CustomRendered = '0'
    + ExifIFD:ExposureMode = '0'
    + ExifIFD:WhiteBalance = '0'
    + ExifIFD:DigitalZoomRatio = '1'
    + ExifIFD:FocalLengthIn35mmFormat = '157'
    + ExifIFD:SceneCaptureType = '0'
    + ExifIFD:GainControl = '0'
    + ExifIFD:Contrast = '0'
    + ExifIFD:Saturation = '0'
    + ExifIFD:Sharpness = '0'
    + ExifIFD:SubjectDistanceRange = '0'
JPEG APP1 (3429 bytes):
  Deleting APP1 XMP segment
Creating APP1:
  Creating XMP
    + XMP-tiff:BitsPerSample = '12'
    + XMP-tiff:Compression = '34713'
    + XMP-tiff:ImageHeight = '2014'
    + XMP-tiff:ImageWidth = '3040'
    + XMP-aux:Lens = '105mm f/2.8'
    + XMP-tiff:PhotometricInterpretation = '32803'
    + XMP-tiff:PlanarConfiguration = '1'
    + XMP-tiff:SamplesPerPixel = '1'
    + XMP-aux:SerialNumber = 'No= 10001ea8'
    + XMP-tiff:YCbCrPositioning = '2'
JPEG COM (17 bytes):
    + Comment = 'mit PSE 7 erzeugt'
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DRI (2 bytes):
JPEG DHT (416 bytes):
JPEG SOS
    1 image files updated

- Phil

Archive

[Originally posted by manni1 on 2009-05-05 16:39:03-07]

Hello Phil,

I tried to delete them before the tagsfromfile-process with the following statement:
      exiftool -all= -tagsfromfile ..%%d%%f.NEF  -ext JPG .
Uninteresting parameters here not shown...

The construct "..%%d%%f.NEF  -ext JPG ." shall transfer the Exifs for all JPG-pictures in the actual directory, not only one. The problem is: "-all= " does not work on a set of files.

I should have told, it's exiftool version 6.93.

Manfred

Archive

[Originally posted by exiftool on 2009-05-05 16:48:00-07]

Hi Manfred,

This should work with a recent version of exiftool.  Version 6.93 is almost
2 years old now.

- Phil

Archive

[Originally posted by manni1 on 2009-05-07 08:25:44-07]

Thanks - I just got the newest version:
Windows Executable: exiftool-7.74.zip
from your site.

Same problem:
exiftool -all=  -tagsfromfile ..%%d%%f.NEF   --orientation --software -software="Photoshop Elements 7" -comment="mit PSE 7 erzeugt" -copyright="Manfred Stibaner" -ext JPG .
does NOT delete the existing Exif data from a group of JPG-files. And so tagsfromfile cannot write informations from NEF to JPG.

I think, the part "-all= " does not address the "-ext JPG ." construct.

Manfred

Archive

[Originally posted by exiftool on 2009-05-07 11:15:27-07]

Hi Manfred,

I think you must be mistaken.  When I run this command, all EXIF is
deleted, but then of course it is recreated again from the NEF image.
You can see in the -v output that the APP1 EXIF segment
is deleted, then created from scratch:

Code:
> exiftool -all= -v -tagsfromfile %f.nef --orientation --software -software="Photoshop Elements 7" -comment="mit PSE 7 erzeugt" -copyright="Manfred Stibaner" -ext JPG tmp
======== tmp/a.jpg
Setting new values from a.nef
Rewriting tmp/a.jpg...
  Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF COM CanonVRD Comment Composite Ducky ExifIFD File FlashPix FotoStation GPS ICC_Profile IFD0 IFD2 IPTC JFIF KodakIFD MIE MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main MIE-Preview MakerNotes Meta MetaIFD PDF PNG PhotoMechanic Photoshop PostScript PrintIM RMETA SubIFD SubIFD1 SubIFD2 Trailer XML XML-* XMP
JPEG APP1 (7988 bytes):
  Deleting APP1 EXIF segment
Creating APP1:
  Creating IFD0
  ExifByteOrder = MM
  Deleting IFD0
  Creating ExifIFD
JPEG APP1 (3429 bytes):
  Deleting APP1 XMP segment
Creating APP1:
  Creating XMP
JPEG COM (17 bytes):
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG SOS
======== tmp/b.jpg
Setting new values from b.nef
Rewriting tmp/b.jpg...
  Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF COM CanonVRD Comment Composite Ducky ExifIFD File FlashPix FotoStation GPS ICC_Profile IFD0 IFD2 IPTC JFIF KodakIFD MIE MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main MIE-Preview MakerNotes Meta MetaIFD PDF PNG PhotoMechanic Photoshop PostScript PrintIM RMETA SubIFD SubIFD1 SubIFD2 Trailer XML XML-* XMP
JPEG APP1 (8970 bytes):
  Deleting APP1 EXIF segment
Creating APP1:
  Creating IFD0
  ExifByteOrder = MM
  Deleting IFD0
  Creating ExifIFD
  Creating GPS
JPEG APP1 (3560 bytes):
  Deleting APP1 XMP segment
Creating APP1:
  Creating XMP
JPEG COM (17 bytes):
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG SOS
    1 directories scanned
    2 image files updated

- Phil

Archive

[Originally posted by manni1 on 2009-05-07 17:35:27-07]

Well - I am mistaken Phil... :-( , indeed.
Yesterday I renamed the NEF files during my picture development process. It could not work this morning. Sorry for that.

The new program version indeed deletes old exif values and writes the originals from NEF to JPG. With one exception:
I mostly look at my photos with a picture tool named IrfanView, wellknown in Europe. With the newly converted Exifs I miss all the maker

notes. But your tool shows those maker notes. And I think that the maker notes were not deleted with the command we just discussed

(the exifs in my JPGs made by Photoshop Elements are nor very proper, espacially the maker notes. Some of these JPGs contain a

phrase "Software     : Adobe Photoshop Elements 7.0  /  Warning : Bad value for ExifOffset" when inspected with your tool).

Code:
============================
I think that the makernotes I see now in the processed Files are those from Photoshop, not those from the RAW files as I want. It seems

that not ALL Exif data are deleted...
============================
Here is the output of the exiftool process:

D:\bilder\RAW\2009\LaPalma\Converted>exiftool -all= -v  -tagsfromfile ..%d%f.NEF   --orientation --software -software="Photoshop

Elements 7" -comment="mit PSE 7 erzeugt" -copyright="Manfred Stibaner" -ext JPG .
======== ./LaPalma-0018.jpg
Setting new values from .../LaPalma-0018.NEF
Rewriting ./LaPalma-0018.jpg...
  Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF COM CanonVRD Comment Composite Ducky ExifIFD

File FlashPix FotoStation GPS ICC_Profile IFD0 IFD2 IPTC JFIF MIE MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main

MIE-Preview MakerNotes Meta MetaIFD NikonPreview PNG PhotoMechanic Photoshop PostScript PrintIM RMETA SubIFD SubIFD1

SubIFD2 Trailer XMP
JPEG APP1 (6766 bytes):
  Deleting IFD0
  Creating IFD0
  Creating ExifIFD
JPEG APP1 (4399 bytes):
  Deleting XMP
  Creating XMP
Creating COM:
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG SOS
======== ./LP-0060.jpg
Setting new values from .../LP-0060.NEF
Rewriting ./LP-0060.jpg...
  Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF COM CanonVRD Comment Composite Ducky ExifIFD

File FlashPix FotoStation GPS ICC_Profile IFD0 IFD2 IPTC JFIF MIE MIE-Camera MIE-Doc MIE-Flash MIE-Image MIE-Lens MIE-Main

MIE-Preview MakerNotes Meta MetaIFD NikonPreview PNG PhotoMechanic Photoshop PostScript PrintIM RMETA SubIFD SubIFD1

SubIFD2 Trailer XMP
JPEG APP1 (4142 bytes):
  Deleting IFD0
  Creating IFD0
  Creating ExifIFD
JPEG APP1 (4399 bytes):
  Deleting XMP
  Creating XMP
Creating COM:
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DHT (416 bytes):
JPEG SOS
    1 directories scanned
    2 image files updated

Yours
Manfred

Archive

[Originally posted by exiftool on 2009-05-07 18:08:00-07]

I'm sure the makernotes were deleted as well, but they were rebuilt
from the makernotes in the NEF image.  I'm not sure why IrfanView
doesn't like these new makernotes.  What about the Nikon utilities,
do they recognize the new makernotes?

- Phil

Archive

[Originally posted by manni1 on 2009-05-07 19:28:30-07]

I have no  Nikon utilities, sorry.
But if I first delete the exifs with "exiftool -all= *.JPG" and run the transfer from NEF to JPG afterwards, I get the whole informations, maker notes included, and visible with IrfanView. That says to me, that the statement above clears ALL exif data, whereas the combination of delete & transfer works different.

Manfred

Archive

[Originally posted by exiftool on 2009-05-08 12:33:48-07]

Manfred,

I believe you are making a false assumption.  Without seeing
an example image, I can't say for sure what is happening, but
my guess is this:

The byte ordering of the EXIF may be different if you delete the
EXIF in a separate step.  I think
the EXIF is created in the original byte order if you delete the
EXIF and rewrite it in the same step, while it is created (by default)
in the makernote byte order if created from scratch.  It is likely
that IrfanView can't handle a makernote byte order that is different
from the EXIF byte order.  This should be considered a limitation of
IrfanView, because this sort of thing happens when editing with
a variety of utilities.

- Phil