[Originally posted by fluschly on 2007-10-05 07:47:53-07]Hello,
I am using exiftool to copy the exif infos from my nikon nef-files into the edited jpg-files.
I wrote a bat-file which does following steps:
echo Delete all meta information except JFIF and ICC-Profile information
exiftool -all= --jfif:all --icc_profile:all -ext jpg %1
echo Copy all meta information
exiftool -TagsFromFile %%dnef/%%f.nef -all:all -ext .jpg %1
echo Delete backup file(s)
del %1*.jpg_original
echo Rename Files to YYYYMMDD_filename.jpg
exiftool "-FileName<${DateTimeOriginal}_$filename" -d %1%%Y%%m%%d %1*.jpg
echo Set original Date and Time
exiftool "-DateTimeOriginal>FileModifyDate" %1*.jpg
For many files this batch file needs a long time to complete. How can I speed up the image processing?
Maybe I can give all options in one long exiftool-call?
Thanks for all help and ideas,
Juergen.
[Originally posted by exiftool on 2007-10-05 11:36:16-07]Hi Juergen,
Things get a bit complicated because you want to use two different date formats,
one to set FileModifyDate and the other to set FileName. But unfortunately, the
-d option is all or nothing. However, we can get around this by adding
a user-defined tag which doesn't do the standard print conversion:
%Image::ExifTool::UserDefined = (
MyDateTime => {
Require => {
0 => 'DateTimeOriginal',
},
ValueConv => '$val[0]',
},
);
(see the
configuration
file documentation for more information about user-defined tags.)
With this, you can combine all of your operations into a single command,
which should give you a good speed boost:
exiftool -all= --jfif:all --icc_profile:all -ext jpg \
-tagsfromfile %%dnef/%%f.nef -all:all "-FileModifyDate<MyDateTime" \
"-FileName<${DateTimeOriginal}_$filename" -d %1%%Y%%m%%d \
-overwrite_original %1
(here I used "\" to indicate a continued line.)
- Phil
[Originally posted by fluschly on 2007-10-05 18:36:05-07]
Hi Phil,
first of all many thanks for your very fast answer.
I tried your speed boost suggestion but I face some problems.
I inserted in .ExifTool_config the UserDefined MyDateTime. The file is in the Exiftool directory and I think it is read, because I forced an error in the config file and Exiftool told me that something is wrong.
Then I modified my bat-file with the speed boost line but that does not work. I always get nef files in the jpg-directory and not the renamed jpg-files.
The date and time do not fit. Also the complete maker notes are missing, if I read the exif infos with irfanview. I think the tagsfromfile option does not work correctly.
Any idea?
Regards,
Juergen.
[Originally posted by exiftool on 2007-10-05 19:13:24-07]Hi Juergen,
Sorry. My mistake. The filename is now being set from the name of the
NEF file (since it is the -tagsfromfile file), so I should have changed the
way this was being done. Instead of adding "_$filename" to the Filename
tag, I should have added "_%%%%f.jpg" to the
-d format string.
exiftool -all= --jfif:all --icc_profile:all -ext jpg \
-tagsfromfile %%dnef/%%f.nef -all:all "-FileModifyDate<MyDateTime" \
"-FileName<DateTimeOriginal" -d %%Y%%m%%d_%%%%f.jpg \
-overwrite_original %1
I have also taken the leading "%1" out of the
-d format string
because you don't need to specify the directory if it isn't being changed.
I have tested this on the command line (with all "%%" changed to "%" and "%1"
changed to a directory name), and it works for me. The makernote
information is copied, and the filesystem date/time is set properly.
Check to be sure that MyDateTime is extracted properly
(ie. "exiftool -mydatetime image.nef"), because this won't be set
unless your user-defined tag is working.
I can't understand why the makernote information wasn't copied for you,
because it was when I tried it here even when the .jpg file was incorrectly
renamed to .nef.
Try adding a
-v3 option and pasting the output here if it
still doesn't work for you.
- Phil
[Originally posted by exiftool on 2007-10-05 19:15:54-07]One thought. The
-tagsfromfile won't work if we are
getting the .nef filename wrong. Near the start of the
-v3output you will see a line like this:
Setting new values from tmp/nef/NikonD2X.nef
Check to be sure this is the correct directory and filename for the
associated .nef.
- Phil
[Originally posted by fluschly on 2007-10-06 11:40:34-07]
Hi Phil,
good news first: renaming now works.
Now to my problems:
I think MyDateTime does not work. I tried it on the command line with exiftool
-MyDateTime dsc_1987.jpg and the date and time did not change.
I also tried on the command line following: (I added the forgotten tags ColorSpace,
Quality and Orientation)
exiftool -v3 -all= --jfif:all --icc_profile:all -ext jpg -TagsFromFile %dnef/%f.nef
-all:all \
-ColorSpace=sRGB -Quality="FINE" -Orientation="Horizontal (normal)"
\
"-FileModifyDate<MyDateTime" "-FileName<DateTimeOriginal"
-d %Y%m%d_%%f.jpg \
-overwrite_original d:\temp >log.txt
Here is the content of log.txt processing 2 images
I found: Setting new values from d:/temp/nef/DSC_1987.nef. In the nef-directory
Dsc_1987.nef is present. Could this be a problem?
Deleting all AFCP tags
Deleting all CanonVRD tags
Deleting all CIFF tags
Deleting all Ducky tags
Deleting all EXIF tags
Deleting all ExifIFD tags
Deleting all File tags
Deleting all FlashPix tags
Deleting all FotoStation tags
Deleting all GPS tags
Deleting all ICC_Profile tags
Deleting all IFD0 tags
Deleting all IPTC tags
Deleting all JFIF tags
Deleting all MakerNotes tags
Deleting all Meta tags
Deleting all MetaIFD tags
Deleting all MIE tags
Deleting all PhotoMechanic tags
Deleting all Photoshop tags
Deleting all PNG tags
Deleting all PrintIM tags
Deleting all RMETA tags
Deleting all Trailer tags
Deleting all XMP tags
Deleting all * tags
[writing new tags after deleting MetaIFD group]
[writing new tags after deleting MakerNotes group]
[writing new tags after deleting IPTC group]
[writing new tags after deleting GPS group]
[writing new tags after deleting CIFF group]
[writing new tags after deleting * group]
[writing new tags after deleting Trailer group]
[writing new tags after deleting Meta group]
[writing new tags after deleting PrintIM group]
[writing new tags after deleting EXIF group]
[writing new tags after deleting RMETA group]
[writing new tags after deleting JFIF group]
[writing new tags after deleting ExifIFD group]
[writing new tags after deleting FlashPix group]
[writing new tags after deleting Photoshop group]
[writing new tags after deleting PNG group]
[writing new tags after deleting IFD0 group]
[writing new tags after deleting ICC_Profile group]
[writing new tags after deleting CanonVRD group]
[writing new tags after deleting File group]
[writing new tags after deleting MIE group]
[writing new tags after deleting AFCP group]
[writing new tags after deleting Ducky group]
[writing new tags after deleting FotoStation group]
[writing new tags after deleting PhotoMechanic group]
[writing new tags after deleting XMP group]
Writing MIE-Image:ColorSpace
Can't convert Minolta:ColorSpace (matches more than one PrintConv)
Writing Nikon:ColorSpace if tag exists
Writing Olympus:ColorSpace if tag exists
Writing Canon:ColorSpace if tag exists
Writing CanonRaw:ColorSpace if tag exists
Writing Sigma:ColorSpace if tag exists
Writing Canon:ColorSpace if tag exists
Writing Pentax:ColorSpace if tag exists
Writing XMP-exif:ColorSpace if tag exists
Writing ExifIFD:ColorSpace
Error converting value for Ducky:Quality (PrintConvInv)
Writing Nikon:Quality if tag exists
Writing Nikon:Quality if tag exists
Writing FujiFilm:Quality if tag exists
Writing Kodak:Quality if tag exists
Can't convert value for Olympus:Quality (no PrintConvInv)
Writing Canon:Quality if tag exists
Error converting value for Sigma:Quality (ValueConvInv)
Writing Casio:Quality if tag exists
Can't convert Pentax:Quality (not in PrintConv)
Writing Casio:Quality if tag exists
Writing XMP-tiff:Orientation if tag exists
Writing IFD0:Orientation
Writing IFD0:Orientation
Removed group JFIF from delete list
Removed group ICC_Profile from delete list
======== d:\temp/DSC_1987.jpg
Setting new values from d:/temp/nef/DSC_1987.nef
Tag 'NikonPreview:YResolution' does not exist
Writing IFD0:YResolution
Writing SubIFD:YResolution
Writing SubIFD1:YResolution
Tag 'NikonPreview:YCbCrPositioning' does not exist
Tag 'SubIFD:YCbCrPositioning' is unsafe for writing
Tag 'NikonPreview:XResolution' does not exist
Writing IFD0:XResolution
Writing SubIFD:XResolution
Writing SubIFD1:XResolution
Writing Nikon:WhiteBalanceFineTune if tag exists
Writing ExifIFD:WhiteBalance
Writing ExifIFD:WhiteBalance if tag exists
Writing Nikon:WhiteBalance if tag exists
Writing Nikon:WhiteBalance if tag exists
Tag 'Nikon:WB_RGBGLevels' is unsafe for writing
Writing Nikon:VariProgram if tag exists
Writing ExifIFD:UserComment
Writing Nikon:ToneComp if tag exists
Sorry, IFD0:TIFF-EPStandardID doesn't exist or isn't writable
Writing ExifIFD:SubjectDistanceRange
Tag 'SubIFD:SubfileType' is unsafe for writing
Tag 'IFD0:SubfileType' is unsafe for writing
Tag 'SubIFD1:SubfileType' is unsafe for writing
Writing ExifIFD:SubSecTimeOriginal
Writing ExifIFD:SubSecTimeDigitized
Writing ExifIFD:SubSecTime
Sorry, Composite:SubSecDateTimeOriginal doesn't exist or isn't writable
Sorry, IFD0:StripOffsets doesn't exist or isn't writable
Sorry, SubIFD1:StripOffsets doesn't exist or isn't writable
Sorry, IFD0:StripByteCounts doesn't exist or isn't writable
Sorry, SubIFD1:StripByteCounts doesn't exist or isn't writable
Writing IFD0:Software
Sorry, Composite:ShutterSpeed doesn't exist or isn't writable
Tag 'Nikon:ShutterCount' does not exist
Can't convert value for Nikon:ShootingMode (no PrintConvInv)
Writing Nikon:Sharpness if tag exists
Writing ExifIFD:Sharpness
Writing ExifIFD:Sharpness if tag exists
Writing Nikon:SerialNumber if tag exists
Writing Nikon:SensorPixelSize if tag exists
Writing SubIFD1:SensingMethod
Writing ExifIFD:SensingMethod
Writing ExifIFD:SceneType
Writing ExifIFD:SceneCaptureType
Sorry, Composite:ScaleFactor35efl doesn't exist or isn't writable
Not an integer for Nikon:Saturation
Writing Nikon:Saturation if tag exists
Writing ExifIFD:Saturation
Writing ExifIFD:Saturation if tag exists
Tag 'IFD0:SamplesPerPixel' is unsafe for writing
Tag 'SubIFD1:SamplesPerPixel' is unsafe for writing
Tag 'IFD0:RowsPerStrip' is unsafe for writing
Tag 'SubIFD1:RowsPerStrip' is unsafe for writing
Tag 'NikonPreview:ResolutionUnit' does not exist
Writing IFD0:ResolutionUnit
Writing SubIFD:ResolutionUnit
Writing SubIFD1:ResolutionUnit
Writing IFD0:ReferenceBlackWhite
Tag 'Composite:RedBalance' does not exist
Writing Nikon:RawImageCenter if tag exists
Writing Nikon:Quality if tag exists
Writing Nikon:Quality if tag exists
Writing Nikon:ProgramShift if tag exists
Tag 'NikonPreview:PreviewImageStart' is protected for writing
Tag 'NikonPreview:PreviewImageLength' is protected for writing
Tag 'PreviewImageStart' is protected for writing
Tag 'PreviewImageLength' is protected for writing
Can't convert Olympus:PreviewImageValid (matches more than one PrintConv)
Can't convert Olympus:PreviewImageValid (matches more than one PrintConv)
Writing Composite:PreviewImage
Writing Olympus:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart if tag exists
Writing Canon:PreviewImageStart if tag exists
Writing Olympus:PreviewImageStart if tag exists
Writing Minolta:PreviewImageStart if tag exists
Writing NikonPreview:PreviewImageStart if tag exists
Writing Ricoh:PreviewImageStart if tag exists
Writing Casio:PreviewImageStart if tag exists
Writing Pentax:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart
Writing SubIFD1:PreviewImageStart
Writing Olympus:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength if tag exists
Writing Canon:PreviewImageLength if tag exists
Writing Olympus:PreviewImageLength if tag exists
Writing Minolta:PreviewImageLength if tag exists
Writing NikonPreview:PreviewImageLength if tag exists
Writing Ricoh:PreviewImageLength if tag exists
Writing Casio:PreviewImageLength if tag exists
Writing Pentax:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength
Writing SubIFD1:PreviewImageLength
Writing Olympus:PreviewImageValid if tag exists
Writing Olympus:PreviewImageValid if tag exists
Tag 'IFD0:PlanarConfiguration' is unsafe for writing
Tag 'SubIFD1:PlanarConfiguration' is unsafe for writing
Tag 'IFD0:PhotometricInterpretation' is unsafe for writing
Tag 'SubIFD1:PhotometricInterpretation' is unsafe for writing
Writing IFD0:Orientation
Writing IFD0:Orientation
Writing SubIFD1:Orientation
Writing SubIFD1:Orientation
Writing Nikon:NoiseReduction if tag exists
Sorry, Nikon:NEFCurve2 doesn't exist or isn't writable
Sorry, Nikon:NEFCurve1 doesn't exist or isn't writable
Writing IFD0:ModifyDate
Writing IFD0:Model
Writing IFD0:Model
Writing Nikon:MinFocalLength if tag exists
Writing ExifIFD:MeteringMode
Writing Nikon:MaxFocalLength if tag exists
Writing ExifIFD:MaxApertureValue
Writing Nikon:MaxApertureAtMinFocal if tag exists
Writing Nikon:MaxApertureAtMaxFocal if tag exists
Writing Nikon:MakerNoteVersion if tag exists
Writing ExifIFD:MakerNoteNikon
Writing IFD0:Make
Writing IFD0:Make
Sorry, File:MIMEType doesn't exist or isn't writable
Writing Nikon:MCUVersion if tag exists
Sorry, Composite:LightValue doesn't exist or isn't writable
Writing ExifIFD:LightSource
Writing Nikon:LightSource if tag exists
Writing Nikon:LensType if tag exists
Sorry, Composite:LensSpec doesn't exist or isn't writable
Writing Nikon:LensIDNumber if tag exists
Tag 'Composite:LensID' does not exist
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensDataVersion if tag exists
Writing Nikon:Lens if tag exists
Tag 'SubIFD:JpgFromRawStart' is protected for writing
Tag 'SubIFD:JpgFromRawLength' is protected for writing
Tag 'JpgFromRawLength' is protected for writing
Tag 'JpgFromRawStart' is protected for writing
Writing Composite:JpgFromRaw
Writing SubIFD2:JpgFromRawLength
Writing SubIFD:JpgFromRawLength
Writing IFD2:JpgFromRawLength
Writing SubIFD2:JpgFromRawStart
Writing SubIFD:JpgFromRawStart
Writing IFD2:JpgFromRawStart
Tag 'IFD0:ImageWidth' is unsafe for writing
Tag 'SubIFD1:ImageWidth' is unsafe for writing
Tag 'Composite:ImageSize' does not exist
Writing Nikon:ImageOptimization if tag exists
Tag 'IFD0:ImageHeight' is unsafe for writing
Tag 'SubIFD1:ImageHeight' is unsafe for writing
Writing Nikon:ISOSetting if tag exists
Writing Nikon:ISO if tag exists
Sorry, Composite:HyperfocalDistance doesn't exist or isn't writable
Writing Nikon:HueAdjustment if tag exists
Writing ExifIFD:GainControl
Tag 'Nikon:FocusPosition' does not exist
Writing Nikon:FocusMode if tag exists
Tag 'Nikon:FocusDistance' does not exist
Writing ExifIFD:FocalLengthIn35mmFormat
Sorry, Composite:FocalLength35efl doesn't exist or isn't writable
Tag 'Nikon:FocalLength' does not exist
Writing ExifIFD:FocalLength
Writing Nikon:FlashType if tag exists
Writing Nikon:FlashSetting if tag exists
Sorry, Composite:FlashOn doesn't exist or isn't writable
Writing Nikon:FlashMode if tag exists
Writing Nikon:FlashExposureComp if tag exists
Writing Nikon:FlashExposureBracketValue if tag exists
Writing ExifIFD:Flash
Sorry, File:FileType doesn't exist or isn't writable
Writing ExifIFD:FileSource
Sorry, File:FileSize doesn't exist or isn't writable
Tag 'File:FileName' is unsafe for writing
Error converting value for File:FileModifyDate (ValueConvInv)
Writing ExifIFD:FNumber
Sorry, Composite:Extension is not writable
Writing ExifIFD:ExposureTime
Writing ExifIFD:ExposureProgram
Writing ExifIFD:ExposureMode
Writing Nikon:ExposureDifference if tag exists
Writing ExifIFD:ExposureCompensation
Writing Nikon:ExposureBracketValue if tag exists
Sorry, Nikon:ExitPupilPosition doesn't exist or isn't writable
Sorry, ExifTool:ExifToolVersion doesn't exist or isn't writable
Writing File:ExifByteOrder
Sorry, Nikon:EffectiveMaxAperture doesn't exist or isn't writable
Tag 'File:Directory' is unsafe for writing
Writing ExifIFD:DigitalZoomRatio
Writing ExifIFD:DateTimeOriginal
Writing IFD0:DateTimeOriginal
Sorry, Composite:DOF doesn't exist or isn't writable
Writing ExifIFD:CustomRendered
Writing ExifIFD:CreateDate
Writing ExifIFD:Contrast
Writing ExifIFD:Contrast if tag exists
Tag 'NikonPreview:Compression' does not exist
Tag 'IFD0:Compression' is unsafe for writing
Tag 'SubIFD:Compression' is unsafe for writing
Tag 'SubIFD1:Compression' is unsafe for writing
Writing Nikon:ColorHue if tag exists
Sorry, Composite:CircleOfConfusion is not writable
Sorry, SubIFD1:CFARepeatPatternDim doesn't exist or isn't writable
Sorry, SubIFD1:CFAPattern2 doesn't exist or isn't writable
Writing ExifIFD:CFAPattern
Tag 'Composite:CFAPattern' does not exist
Tag 'Composite:BlueBalance' does not exist
Tag 'IFD0:BitsPerSample' is unsafe for writing
Tag 'SubIFD1:BitsPerSample' is unsafe for writing
Sorry, Composite:BaseName is not writable
Sorry, Composite:Aperture doesn't exist or isn't writable
Writing Nikon:AFPointsInFocus if tag exists
Writing Nikon:AFPoint if tag exists
Writing Nikon:AFAreaMode if tag exists
Sorry, Nikon:AFAperture doesn't exist or isn't writable
Writing File:FileName
Writing File:FileName
'd:\temp/DSC_1987.jpg' --> 'd:\temp/20070823_DSC_1987.jpg'
Rewriting d:\temp/DSC_1987.jpg...
Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF
COM CanonVRD Comment Composite Ducky ExifIFD File FlashPix FotoStation GPS IFD0
IFD2 IPTC JFIF MIE MIE-Image MakerNotes Meta MetaIFD NikonPreview PNG PhotoMechanic
Photoshop PrintIM RMETA SubIFD SubIFD1 SubIFD2 Trailer XMP
Creating tags in: APP1 Composite ExifIFD File IFD0 IFD2 MIE-Image
SubIFD SubIFD1 SubIFD2
JPEG APP0 (14 bytes):
0000: 4a 46 49 46 00 01 02 01 01 2c 01 2c 00 00 [JFIF.....,.,..]
Rewriting JFIF
JPEG APP1 (5009 bytes):
0000: 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 09 00
[Exif..II*.......]
0010: 0f 01 02 00 12 00 00 00 7a 00 00 00 10 01 02 00
[........z.......]
0020: 0a 00 00 00 8c 00 00 00 12 01 03 00 01 00 00 00
[................]
0030: 01 00 00 00 1a 01 05 00 01 00 00 00 96 00 00 00
[................]
0040: 1b 01 05 00 01 00 00 00 9e 00 00 00 28 01 03 00
[............(...]
0050: 01 00 00 00 02 00 00 00 31 01 02 00 1c 00 00 00
[........1.......]
0060: a6 00 00 00 32 01 02 00 14 00 00 00 c2 00 00 00
[....2...........]
[snip 4897 bytes]
ExifByteOrder = II
Deleting IFD0
Creating IFD0
+ IFD0:Make = 'NIKON CORPORATION'
+ IFD0:Model = 'NIKON D70'
+ IFD0:Orientation = '1'
+ IFD0:XResolution = '300'
+ IFD0:YResolution = '300'
+ IFD0:ResolutionUnit = '2'
+ IFD0:Software = 'Ver.2.00 '
+ IFD0:ModifyDate = '2007:08:23 00:00:00'
+ IFD0:YCbCrPositioning = '1' (mandatory)
+ IFD0:ReferenceBlackWhite = '0 255 0 255 0 255'
Creating ExifIFD
+ ExifIFD:ExposureTime = '0.0166666666666667'
+ ExifIFD:FNumber = '4.0'
+ ExifIFD:ExposureProgram = '0'
+ ExifIFD:ExifVersion = '0220' (mandatory)
+ ExifIFD:DateTimeOriginal = '2007:08:23 00:00:00'
+ ExifIFD:CreateDate = '2007:08:23 00:00:00'
+ ExifIFD:ComponentsConfiguration = '...' (mandatory)
+ ExifIFD:ExposureCompensation = '0'
+ ExifIFD:MaxApertureValue = '4'
+ ExifIFD:MeteringMode = '5'
+ ExifIFD:LightSource = '0'
+ ExifIFD:Flash = '31'
+ ExifIFD:FocalLength = '31.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 = '1'
+ ExifIFD:SensingMethod = '2'
+ ExifIFD:FileSource = '.'
+ ExifIFD:SceneType = '.'
+ ExifIFD:CFAPattern = '.....'
+ ExifIFD:CustomRendered = '0'
+ ExifIFD:ExposureMode = '0'
+ ExifIFD:WhiteBalance = '0'
+ ExifIFD:DigitalZoomRatio = '1'
+ ExifIFD:FocalLengthIn35mmFormat = '46'
+ ExifIFD:SceneCaptureType = '0'
+ ExifIFD:GainControl = '0'
+ ExifIFD:Contrast = '0'
+ ExifIFD:Saturation = '0'
+ ExifIFD:Sharpness = '0'
+ ExifIFD:SubjectDistanceRange = '0'
+ IFD0:DateTimeOriginal = '2007:08:23 00:00:00'
JPEG APP13 (5936 bytes):
0000: 50 68 6f 74 6f 73 68 6f 70 20 33 2e 30 00 38 42
[Photoshop 3.0.8B]
0010: 49 4d 04 04 00 00 00 00 00 07 1c 02 00 00 02 00
[IM..............]
0020: 02 00 38 42 49 4d 04 25 00 00 00 00 00 10 46 0c
[..8BIM.%......F.]
0030: f2 89 26 b8 56 da b0 9c 01 a1 b0 a7 90 77 38 42
[..&.V........w8B]
0040: 49 4d 03 ed 00 00 00 00 00 10 01 2c 00 00 00 01
[IM.........,....]
0050: 00 02 01 2c 00 00 00 01 00 02 38 42 49 4d 04 26
[...,......8BIM.&]
0060: 00 00 00 00 00 0e 00 00 00 00 00 00 00 00 00 00
[................]
[snip 5824 bytes]
Deleting Photoshop
Deleting APP13 Photoshop segment
JPEG APP1 (18145 bytes):
0000: 68 74 74 70 3a 2f 2f 6e 73 2e 61 64 6f 62 65 2e
[http://ns.adobe.]
0010: 63 6f 6d 2f 78 61 70 2f 31 2e 30 2f 00 3c 3f 78
[com/xap/1.0/.<?x]
0020: 70 61 63 6b 65 74 20 62 65 67 69 6e 3d 22 ef bb
[packet begin="..]
0030: bf 22 20 69 64 3d 22 57 35 4d 30 4d 70 43 65 68
[." id="W5M0MpCeh]
0040: 69 48 7a 72 65 53 7a 4e 54 63 7a 6b 63 39 64 22
[iHzreSzNTczkc9d"]
0050: 3f 3e 0a 3c 78 3a 78 6d 70 6d 65 74 61 20 78 6d
[?>.<x:xmpmeta xm]
0060: 6c 6e 73 3a 78 3d 22 61 64 6f 62 65 3a 6e 73 3a
[lns:x="adobe:ns:]
[snip 18033 bytes]
Deleting XMP
Deleting APP1 XMP segment
JPEG APP2 (3158 bytes):
0000: 49 43 43 5f 50 52 4f 46 49 4c 45 00 01 01 00 00
[ICC_PROFILE.....]
0010: 0c 48 4c 69 6e 6f 02 10 00 00 6d 6e 74 72 52 47
[.HLino....mntrRG]
0020: 42 20 58 59 5a 20 07 ce 00 02 00 09 00 06 00 31
[B XYZ .........1]
0030: 00 00 61 63 73 70 4d 53 46 54 00 00 00 00 49 45
[..acspMSFT....IE]
0040: 43 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00
[C sRGB..........]
0050: 00 00 00 00 f6 d6 00 01 00 00 00 00 d3 2d 48 50
[.............-HP]
0060: 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ ..............]
[snip 3046 bytes]
Rewriting ICC_Profile
JPEG APP14 (12 bytes):
0000: 41 64 6f 62 65 00 64 40 00 00 00 01 [Adobe.d@....]
Deleting APP14 unknown segment
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DRI (2 bytes):
JPEG DHT (416 bytes):
JPEG SOS
======== d:\temp/DSC_1988.jpg
Setting new values from d:/temp/nef/DSC_1988.nef
Tag 'NikonPreview:YResolution' does not exist
Writing IFD0:YResolution
Writing SubIFD:YResolution
Writing SubIFD1:YResolution
Tag 'NikonPreview:YCbCrPositioning' does not exist
Tag 'SubIFD:YCbCrPositioning' is unsafe for writing
Tag 'NikonPreview:XResolution' does not exist
Writing IFD0:XResolution
Writing SubIFD:XResolution
Writing SubIFD1:XResolution
Writing Nikon:WhiteBalanceFineTune if tag exists
Writing ExifIFD:WhiteBalance
Writing ExifIFD:WhiteBalance if tag exists
Writing Nikon:WhiteBalance if tag exists
Writing Nikon:WhiteBalance if tag exists
Tag 'Nikon:WB_RGBGLevels' is unsafe for writing
Writing Nikon:VariProgram if tag exists
Writing ExifIFD:UserComment
Writing Nikon:ToneComp if tag exists
Sorry, IFD0:TIFF-EPStandardID doesn't exist or isn't writable
Writing ExifIFD:SubjectDistanceRange
Tag 'SubIFD:SubfileType' is unsafe for writing
Tag 'IFD0:SubfileType' is unsafe for writing
Tag 'SubIFD1:SubfileType' is unsafe for writing
Writing ExifIFD:SubSecTimeOriginal
Writing ExifIFD:SubSecTimeDigitized
Writing ExifIFD:SubSecTime
Sorry, Composite:SubSecDateTimeOriginal doesn't exist or isn't writable
Sorry, IFD0:StripOffsets doesn't exist or isn't writable
Sorry, SubIFD1:StripOffsets doesn't exist or isn't writable
Sorry, IFD0:StripByteCounts doesn't exist or isn't writable
Sorry, SubIFD1:StripByteCounts doesn't exist or isn't writable
Writing IFD0:Software
Sorry, Composite:ShutterSpeed doesn't exist or isn't writable
Tag 'Nikon:ShutterCount' does not exist
Can't convert value for Nikon:ShootingMode (no PrintConvInv)
Writing Nikon:Sharpness if tag exists
Writing ExifIFD:Sharpness
Writing ExifIFD:Sharpness if tag exists
Writing Nikon:SerialNumber if tag exists
Writing Nikon:SensorPixelSize if tag exists
Writing SubIFD1:SensingMethod
Writing ExifIFD:SensingMethod
Writing ExifIFD:SceneType
Writing ExifIFD:SceneCaptureType
Sorry, Composite:ScaleFactor35efl doesn't exist or isn't writable
Not an integer for Nikon:Saturation
Writing Nikon:Saturation if tag exists
Writing ExifIFD:Saturation
Writing ExifIFD:Saturation if tag exists
Tag 'IFD0:SamplesPerPixel' is unsafe for writing
Tag 'SubIFD1:SamplesPerPixel' is unsafe for writing
Tag 'IFD0:RowsPerStrip' is unsafe for writing
Tag 'SubIFD1:RowsPerStrip' is unsafe for writing
Tag 'NikonPreview:ResolutionUnit' does not exist
Writing IFD0:ResolutionUnit
Writing SubIFD:ResolutionUnit
Writing SubIFD1:ResolutionUnit
Writing IFD0:ReferenceBlackWhite
Tag 'Composite:RedBalance' does not exist
Writing Nikon:RawImageCenter if tag exists
Writing Nikon:Quality if tag exists
Writing Nikon:Quality if tag exists
Writing Nikon:ProgramShift if tag exists
Tag 'NikonPreview:PreviewImageStart' is protected for writing
Tag 'NikonPreview:PreviewImageLength' is protected for writing
Tag 'PreviewImageStart' is protected for writing
Tag 'PreviewImageLength' is protected for writing
Can't convert Olympus:PreviewImageValid (matches more than one PrintConv)
Can't convert Olympus:PreviewImageValid (matches more than one PrintConv)
Writing Composite:PreviewImage
Writing Olympus:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart if tag exists
Writing Canon:PreviewImageStart if tag exists
Writing Olympus:PreviewImageStart if tag exists
Writing Minolta:PreviewImageStart if tag exists
Writing NikonPreview:PreviewImageStart if tag exists
Writing Ricoh:PreviewImageStart if tag exists
Writing Casio:PreviewImageStart if tag exists
Writing Pentax:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart
Writing SubIFD1:PreviewImageStart
Writing Olympus:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength if tag exists
Writing Canon:PreviewImageLength if tag exists
Writing Olympus:PreviewImageLength if tag exists
Writing Minolta:PreviewImageLength if tag exists
Writing NikonPreview:PreviewImageLength if tag exists
Writing Ricoh:PreviewImageLength if tag exists
Writing Casio:PreviewImageLength if tag exists
Writing Pentax:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength
Writing SubIFD1:PreviewImageLength
Writing Olympus:PreviewImageValid if tag exists
Writing Olympus:PreviewImageValid if tag exists
Tag 'IFD0:PlanarConfiguration' is unsafe for writing
Tag 'SubIFD1:PlanarConfiguration' is unsafe for writing
Tag 'IFD0:PhotometricInterpretation' is unsafe for writing
Tag 'SubIFD1:PhotometricInterpretation' is unsafe for writing
Writing IFD0:Orientation
Writing IFD0:Orientation
Writing SubIFD1:Orientation
Writing SubIFD1:Orientation
Writing Nikon:NoiseReduction if tag exists
Sorry, Nikon:NEFCurve2 doesn't exist or isn't writable
Sorry, Nikon:NEFCurve1 doesn't exist or isn't writable
Writing IFD0:ModifyDate
Writing IFD0:Model
Writing IFD0:Model
Writing Nikon:MinFocalLength if tag exists
Writing ExifIFD:MeteringMode
Writing Nikon:MaxFocalLength if tag exists
Writing ExifIFD:MaxApertureValue
Writing Nikon:MaxApertureAtMinFocal if tag exists
Writing Nikon:MaxApertureAtMaxFocal if tag exists
Writing Nikon:MakerNoteVersion if tag exists
Writing ExifIFD:MakerNoteNikon
Writing IFD0:Make
Writing IFD0:Make
Sorry, File:MIMEType doesn't exist or isn't writable
Writing Nikon:MCUVersion if tag exists
Sorry, Composite:LightValue doesn't exist or isn't writable
Writing ExifIFD:LightSource
Writing Nikon:LightSource if tag exists
Writing Nikon:LensType if tag exists
Sorry, Composite:LensSpec doesn't exist or isn't writable
Writing Nikon:LensIDNumber if tag exists
Tag 'Composite:LensID' does not exist
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensFStops if tag exists
Writing Nikon:LensDataVersion if tag exists
Writing Nikon:Lens if tag exists
Tag 'SubIFD:JpgFromRawStart' is protected for writing
Tag 'SubIFD:JpgFromRawLength' is protected for writing
Tag 'JpgFromRawLength' is protected for writing
Tag 'JpgFromRawStart' is protected for writing
Writing Composite:JpgFromRaw
Writing SubIFD2:JpgFromRawLength
Writing SubIFD:JpgFromRawLength
Writing IFD2:JpgFromRawLength
Writing SubIFD2:JpgFromRawStart
Writing SubIFD:JpgFromRawStart
Writing IFD2:JpgFromRawStart
Tag 'IFD0:I
mageWidth' is unsafe for writing
Tag 'SubIFD1:ImageWidth' is unsafe for writing
Tag 'Composite:ImageSize' does not exist
Writing Nikon:ImageOptimization if tag exists
Tag 'IFD0:ImageHeight' is unsafe for writing
Tag 'SubIFD1:ImageHeight' is unsafe for writing
Writing Nikon:ISOSetting if tag exists
Writing Nikon:ISO if tag exists
Sorry, Composite:HyperfocalDistance doesn't exist or isn't writable
Writing Nikon:HueAdjustment if tag exists
Writing ExifIFD:GainControl
Tag 'Nikon:FocusPosition' does not exist
Writing Nikon:FocusMode if tag exists
Tag 'Nikon:FocusDistance' does not exist
Writing ExifIFD:FocalLengthIn35mmFormat
Sorry, Composite:FocalLength35efl doesn't exist or isn't writable
Tag 'Nikon:FocalLength' does not exist
Writing ExifIFD:FocalLength
Writing Nikon:FlashType if tag exists
Writing Nikon:FlashSetting if tag exists
Sorry, Composite:FlashOn doesn't exist or isn't writable
Writing Nikon:FlashMode if tag exists
Writing Nikon:FlashExposureComp if tag exists
Writing Nikon:FlashExposureBracketValue if tag exists
Writing ExifIFD:Flash
Sorry, File:FileType doesn't exist or isn't writable
Writing ExifIFD:FileSource
Sorry, File:FileSize doesn't exist or isn't writable
Tag 'File:FileName' is unsafe for writing
Error converting value for File:FileModifyDate (ValueConvInv)
Writing ExifIFD:FNumber
Sorry, Composite:Extension is not writable
Writing ExifIFD:ExposureTime
Writing ExifIFD:ExposureProgram
Writing ExifIFD:ExposureMode
Writing Nikon:ExposureDifference if tag exists
Writing ExifIFD:ExposureCompensation
Writing Nikon:ExposureBracketValue if tag exists
Sorry, Nikon:ExitPupilPosition doesn't exist or isn't writable
Sorry, ExifTool:ExifToolVersion doesn't exist or isn't writable
Writing File:ExifByteOrder
Sorry, Nikon:EffectiveMaxAperture doesn't exist or isn't writable
Tag 'File:Directory' is unsafe for writing
Writing ExifIFD:DigitalZoomRatio
Writing ExifIFD:DateTimeOriginal
Writing IFD0:DateTimeOriginal
Sorry, Composite:DOF doesn't exist or isn't writable
Writing ExifIFD:CustomRendered
Writing ExifIFD:CreateDate
Writing ExifIFD:Contrast
Writing ExifIFD:Contrast if tag exists
Tag 'NikonPreview:Compression' does not exist
Tag 'IFD0:Compression' is unsafe for writing
Tag 'SubIFD:Compression' is unsafe for writing
Tag 'SubIFD1:Compression' is unsafe for writing
Writing Nikon:ColorHue if tag exists
Sorry, Composite:CircleOfConfusion is not writable
Sorry, SubIFD1:CFARepeatPatternDim doesn't exist or isn't writable
Sorry, SubIFD1:CFAPattern2 doesn't exist or isn't writable
Writing ExifIFD:CFAPattern
Tag 'Composite:CFAPattern' does not exist
Tag 'Composite:BlueBalance' does not exist
Tag 'IFD0:BitsPerSample' is unsafe for writing
Tag 'SubIFD1:BitsPerSample' is unsafe for writing
Sorry, Composite:BaseName is not writable
Sorry, Composite:Aperture doesn't exist or isn't writable
Writing Nikon:AFPointsInFocus if tag exists
Writing Nikon:AFPoint if tag exists
Writing Nikon:AFAreaMode if tag exists
Sorry, Nikon:AFAperture doesn't exist or isn't writable
Writing File:FileName
Writing File:FileName
'd:\temp/DSC_1988.jpg' --> 'd:\temp/20070823_DSC_1988.jpg'
Rewriting d:\temp/DSC_1988.jpg...
Editing tags in: * AFCP APP0 APP1 APP12 APP13 APP2 APP3 APP5 CIFF
COM CanonVRD Comment Composite Ducky ExifIFD File FlashPix FotoStation GPS IFD0
IFD2 IPTC JFIF MIE MIE-Image MakerNotes Meta MetaIFD NikonPreview PNG PhotoMechanic
Photoshop PrintIM RMETA SubIFD SubIFD1 SubIFD2 Trailer XMP
Creating tags in: APP1 Composite ExifIFD File IFD0 IFD2 MIE-Image
SubIFD SubIFD1 SubIFD2
JPEG APP0 (14 bytes):
0000: 4a 46 49 46 00 01 02 01 01 2c 01 2c 00 00 [JFIF.....,.,..]
Rewriting JFIF
JPEG APP1 (4241 bytes):
0000: 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 09 00
[Exif..II*.......]
0010: 0f 01 02 00 12 00 00 00 7a 00 00 00 10 01 02 00
[........z.......]
0020: 0a 00 00 00 8c 00 00 00 12 01 03 00 01 00 00 00
[................]
0030: 01 00 00 00 1a 01 05 00 01 00 00 00 96 00 00 00
[................]
0040: 1b 01 05 00 01 00 00 00 9e 00 00 00 28 01 03 00
[............(...]
0050: 01 00 00 00 02 00 00 00 31 01 02 00 1c 00 00 00
[........1.......]
0060: a6 00 00 00 32 01 02 00 14 00 00 00 c2 00 00 00
[....2...........]
[snip 4129 bytes]
ExifByteOrder = II
Deleting IFD0
Creating IFD0
+ IFD0:Make = 'NIKON CORPORATION'
+ IFD0:Model = 'NIKON D70'
+ IFD0:Orientation = '6'
+ IFD0:XResolution = '300'
+ IFD0:YResolution = '300'
+ IFD0:ResolutionUnit = '2'
+ IFD0:Software = 'Ver.2.00 '
+ IFD0:ModifyDate = '2007:08:23 00:00:00'
+ IFD0:YCbCrPositioning = '1' (mandatory)
+ IFD0:ReferenceBlackWhite = '0 255 0 255 0 255'
Creating ExifIFD
+ ExifIFD:ExposureTime = '0.0166666666666667'
+ ExifIFD:FNumber = '4.2'
+ ExifIFD:ExposureProgram = '0'
+ ExifIFD:ExifVersion = '0220' (mandatory)
+ ExifIFD:DateTimeOriginal = '2007:08:23 00:00:00'
+ ExifIFD:CreateDate = '2007:08:23 00:00:00'
+ ExifIFD:ComponentsConfiguration = '...' (mandatory)
+ ExifIFD:ExposureCompensation = '0'
+ ExifIFD:MaxApertureValue = '4.07124781946144'
+ ExifIFD:MeteringMode = '5'
+ ExifIFD:LightSource = '0'
+ ExifIFD:Flash = '31'
+ ExifIFD:FocalLength = '35.0'
+ ExifIFD:MakerNoteNikon = 'Nikon..MM*.+...0210..................(....0....8....F.[snip]'
+ ExifIFD:UserComment = 'ASCII '
+ ExifIFD:SubSecTime = '90'
+ ExifIFD:SubSecTimeOriginal = '90'
+ ExifIFD:SubSecTimeDigitized = '90'
+ ExifIFD:FlashpixVersion = '0100' (mandatory)
+ ExifIFD:ColorSpace = '1'
+ ExifIFD:SensingMethod = '2'
+ ExifIFD:FileSource = '.'
+ ExifIFD:SceneType = '.'
+ ExifIFD:CFAPattern = '.....'
+ ExifIFD:CustomRendered = '0'
+ ExifIFD:ExposureMode = '0'
+ ExifIFD:WhiteBalance = '0'
+ ExifIFD:DigitalZoomRatio = '1'
+ ExifIFD:FocalLengthIn35mmFormat = '52'
+ ExifIFD:SceneCaptureType = '0'
+ ExifIFD:GainControl = '0'
+ ExifIFD:Contrast = '0'
+ ExifIFD:Saturation = '0'
+ ExifIFD:Sharpness = '0'
+ ExifIFD:SubjectDistanceRange = '0'
+ IFD0:DateTimeOriginal = '2007:08:23 00:00:00'
JPEG APP13 (5168 bytes):
0000: 50 68 6f 74 6f 73 68 6f 70 20 33 2e 30 00 38 42
[Photoshop 3.0.8B]
0010: 49 4d 04 04 00 00 00 00 00 07 1c 02 00 00 02 00
[IM..............]
0020: 02 00 38 42 49 4d 04 25 00 00 00 00 00 10 46 0c
[..8BIM.%......F.]
0030: f2 89 26 b8 56 da b0 9c 01 a1 b0 a7 90 77 38 42
[..&.V........w8B]
0040: 49 4d 03 ed 00 00 00 00 00 10 01 2c 00 00 00 01
[IM.........,....]
0050: 00 02 01 2c 00 00 00 01 00 02 38 42 49 4d 04 26
[...,......8BIM.&]
0060: 00 00 00 00 00 0e 00 00 00 00 00 00 00 00 00 00
[................]
[snip 5056 bytes]
Deleting Photoshop
Deleting APP13 Photoshop segment
JPEG APP1 (18162 bytes):
0000: 68 74 74 70 3a 2f 2f 6e 73 2e 61 64 6f 62 65 2e
[http://ns.adobe.]
0010: 63 6f 6d 2f 78 61 70 2f 31 2e 30 2f 00 3c 3f 78
[com/xap/1.0/.<?x]
0020: 70 61 63 6b 65 74 20 62 65 67 69 6e 3d 22 ef bb
[packet begin="..]
0030: bf 22 20 69 64 3d 22 57 35 4d 30 4d 70 43 65 68
[." id="W5M0MpCeh]
0040: 69 48 7a 72 65 53 7a 4e 54 63 7a 6b 63 39 64 22
[iHzreSzNTczkc9d"]
0050: 3f 3e 0a 3c 78 3a 78 6d 70 6d 65 74 61 20 78 6d
[?>.<x:xmpmeta xm]
0060: 6c 6e 73 3a 78 3d 22 61 64 6f 62 65 3a 6e 73 3a
[lns:x="adobe:ns:]
[snip 18050 bytes]
Deleting XMP
Deleting APP1 XMP segment
JPEG APP2 (3158 bytes):
0000: 49 43 43 5f 50 52 4f 46 49 4c 45 00 01 01 00 00
[ICC_PROFILE.....]
0010: 0c 48 4c 69 6e 6f 02 10 00 00 6d 6e 74 72 52 47
[.HLino....mntrRG]
0020: 42 20 58 59 5a 20 07 ce 00 02 00 09 00 06 00 31
[B XYZ .........1]
0030: 00 00 61 63 73 70 4d 53 46 54 00 00 00 00 49 45
[..acspMSFT....IE]
0040: 43 20 73 52 47 42 00 00 00 00 00 00 00 00 00 00
[C sRGB..........]
0050: 00 00 00 00 f6 d6 00 01 00 00 00 00 d3 2d 48 50
[.............-HP]
0060: 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ ..............]
[snip 3046 bytes]
Rewriting ICC_Profile
JPEG APP14 (12 bytes):
0000: 41 64 6f 62 65 00 64 40 00 00 00 01 [Adobe.d@....]
Deleting APP14 unknown segment
JPEG DQT (130 bytes):
JPEG SOF0:
JPEG DRI (2 bytes):
JPEG DHT (416 bytes):
JPEG SOS
1 directories scanned
2 image files updated
Additionally I processed the two images with my old script and the new one.
I wrote the meta information to log-files and saw following differences:
Quality and orientation tags are not written correctly and the Preview Image
Start is different. I think dates are incorrect because MyDateTime is not working.
Could these differences cause some problems with displaying exif-info especially
the makers notes?
old script:
[File] File Modification
Date/Time : 2007:08:23 19:36:40
[EXIF] Orientation :
Horizontal (normal)
[EXIF] Modify Date :
2007:08:23 19:36:40
[EXIF] Create Date :
2007:08:23 19:36:40
[EXIF] Date/Time Original
:
2007:08:23 19:36:40
[MakerNotes] Quality :
Fine
[MakerNotes] Preview Image Start :
8060
[Composite] Date/Time Original :
2007:08:23 19:36:40.00
new script:
[File] File Modification
Date/Time : 2007:10:06 13:22:30
[EXIF] Orientation :
Rotate 90 CW
[EXIF] Modify Date :
2007:08:23 00:00:00
[EXIF] Create Date :
2007:08:23 00:00:00
[EXIF] Date/Time Original
:
2007:08:23 00:00:00
[MakerNotes] Quality :
Raw
[MakerNotes] Preview Image Start :
7942
[Composite] Date/Time Original :
2007:08:23 00:00:00.00
I also forgot to include the copyright line of my script:
exiftool -d %%Y "-Copyright<Copyright (c) $DateTimeOriginal Juergen"
-ext .jpg %1
I also tried to give this to the speed boosting version but there were some
problems with $DateTimeOriginal.
I just inserted -d %%Y "-Copyright<Copyright (c) $DateTimeOriginal Juergen"
I was so glad to have a working tool but the speeding up is going to overstrain
me.
Hope you can help me again.
Regards,
Juergen.
[Originally posted by exiftool on 2007-10-06 12:23:06-07]Hi Juergen,
So the file naming and the copying of the makernotes is working now,
great.
The command "exiftool -MyDateTime dsc_1987.jpg" should extract the
unformatted dateTimeOriginal via your user-defined tag, not change
the file date/time. I wanted you to test this to be sure the MyDateTime
tag value was being properly extracted. If not, then copying it to
FileModifyDate won't work. I see this in your output, so there is
something wrong:
Error converting value for File:FileModifyDate (ValueConvInv)
Once we get this working, all of your initial problems are solved.
Then there are two new problems you've just introduced:
1) If you want to assign specific values from tags, you need to also
exclude them from the
-tagsfromfile copy, because of the
order of operations. From the exiftool documentation:
When performing complex batch processing, it is important to note that
the order of operations is different for tags copied in batch mode. In
general, tags are copied from batch-mode files after all other command-line
arguments have been applied. [...]
So, for example, you need to do this for the Orientation tag:
... -tagsfromfile -all:all --orientation -orientation="Horizontal" ...
2) You can only have one
-d option in effect for a command. So
you can't also use
-d to set the format of DateTimeOriginal for
setting the Copyright tag. There are ways around this using custom tags,
but let's get the other problems solved before trying this.
- Phil
[Originally posted by exiftool on 2007-10-07 11:21:23-07]OOOPS!! I just saw the problem with the config file I posted above!
I forgot to cut and paste the name the tag table where the tags were
supposed to go ('Image::ExifTool::Composite'). Here's the fix, plus a
MyYear tag for you to use in the Copyright:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyDateTime => {
Require => {
0 => 'DateTimeOriginal',
},
ValueConv => '$val[0]',
},
MyYear => {
Require => {
0 => 'DateTimeOriginal',
},
ValueConv => '$val[0] =~ /(\d+)/; $1',
},
},
);
Sorry for that.
- Phil
[Originally posted by fluschly on 2007-10-07 11:35:18-07]Hi Phil,
I tried to get -MyDateTime working. I am sure that .ExifTool_config-file
is read.
If I just give MyDate => 'DateTimeOriginal', I get following output:
Date/Time Original 2007:08:23 19:36:40+02:00
If I add the other lines I get no output. I also played around with the brackets, because I had no other idea.
In my used config-file there is the pre-defined tag
MyShortcut => ['createdate','exposuretime','aperture']
If I change the [-brackets to {-brackets I get no output.
So what's wrong with my file or with the 'Require' and 'ValueConv' lines?
Do I have to use special formatting in the config-file?
Regards,
Juergen.
[Originally posted by fluschly on 2007-10-07 11:44:28-07]
Hi Phil,
I just saw your new posting and tried it.
Now with exiftool -MyDatetime dsc_1987.jpg I should get DateTimeOriginal shouldn't
I?
Unfortunatelly I again get no output.
Regards,
Juergen.
[Originally posted by exiftool on 2007-10-07 19:02:39-07]Hi Juergen,
I just double checked the exact config file I posted above,
and it works fine. Be sure that DateTimeOriginal exists in
the file. ie)
> exiftool -datetimeoriginal -mydatetime -myyear image.jpg
Date/Time Original : 2003:10:31 15:44:19
My Date Time : 2003:10:31 15:44:19
My Year : 2003
Also, you could add a print statement to the config file to be
sure it is being executed properly. ie)
print "hello!\n";
- Phil
[Originally posted by fluschly on 2007-10-07 19:57:24-07]
Hi Phil,
I changed the config-file according to your posting:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyDateTime => {
Require
=> {
0
=> 'DateTimeOriginal',
},
ValueConv
=> '$val[0]',
print
"hello 1!\n",
},
MyYear => {
Require
=> {
0
=> 'DateTimeOriginal',
},
ValueConv
=> '$val[0] =~ /(\d+)/; $1',
print
"hello 2!\n",
},
print "hello
3!\n",
},
print "hello 4!\n",
);
My command line: exiftool -datetimeoriginal -MyDateTime -MyYear
dsc_1987.jpg
And here is the output:
hello 1!
hello 2!
hello 3!
hello 4!
Date/Time Original :
2007:08:23 19:36:40+02:00
Seems to be a very strange problem.
BTW: I am using the Windows version of Exiftool unter W2K.
Any ideas?
Can we solve these problems or do I have to live with my slow batch-version?
Juergen.
[Originally posted by exiftool on 2007-10-08 00:14:49-07]
Hi Juergen,
Wow, I'm stumped. I even dragged out the PC and tried this with
the Windows executable version under Windows XP (I don't have
a system with W2K available), and it worked fine.
Your output is perfect and I cut and pasted your exact config
file and I couldn't reproduce your problem.
It is obviously loading the config file, but somehow the user-defined
tags are not being created properly, or aren't working for some
reason. The only thing I can suggest is updating to the most
recent version of ExifTool (which is 6.99 -- what version were
you using?). If that doesn't work then it must be a
system-dependent problem, which will be incredibly difficult
to resolve since I can't run Windows 2000.
- Phil
[Originally posted by fluschly on 2007-10-08 04:43:49-07]
Hi Phil,
I tried exiftool with the config-file on a Windows XP computer and I got the same output as mentioned above.
While I was testing I had another idea. For this test I only used your user defined tags and now it works.
Before I just added your lines to the config-file which comes with the docu.
I will try in the afternoon on my W2K computer and give feedback.
Until yesterday I was using version 6.98, but yesterday I downloaded 6.99.
Regards,
Juergen.
[Originally posted by fluschly on 2007-10-08 10:37:45-07]Hello again,
I played around on Windows XP with the working config-file.
Filename and date and time are set correctly, but if I have a look on the exif info I find
Date/Time Original : 2007:08:23 00:00:00
Any idea why the time is set to 00:00:00?
Another thing what's interesting:
If I do one call
exiftool -all= --jfif:all --icc_profile:all -ext jpg -TagsFromFile %%dnef/%%f.nef -all:all \
--Quality -Quality="FINE" -ColorSpace=sRGB --Orientation -Orientation="Horizontal (normal)" \
%%Y "-Copyright<Copyright (c)$MyYear Juergen" "-FileModifyDate<MyDateTime" \
"-FileName<DateTimeOriginal" -d %%Y%%m%%d_%%%%f.jpg -overwrite_original %1
I get following infos:
Exif Byte Order : Big-endian (Motorola)
Date/Time Original : 2007:08:23 00:00:00
Quality : Raw
If I do two calls:
exiftool -all= --jfif:all --icc_profile:all -ext jpg %1
exiftool -TagsFromFile %%dnef/%%f.nef -all:all -ext jpg \
--Quality "-Quality=FINE" -ColorSpace=sRGB --Orientation -Orientation="Horizontal (normal)" \
%%Y "-Copyright<Copyright (c)$MyYear Juergen" "-FileModifyDate<MyDateTime" \
"-FileName<DateTimeOriginal" -d %%Y%%m%%d_%%%%f.jpg -overwrite_original %1
I get these infos:
Exif Byte Order : Little-endian (Intel)
Date/Time Original : 2007:08:23 00:00:00
Quality : Raw
Now with the two calls the exif-infos especially maker notes can be displayed in irfanview and I think there could be a relation to the Exif Byte Order. Could this be and why is it different?
Why can't I set Quality to FINE?
One step closer to the solution :-)
Regards,
Juergen
[Originally posted by exiftool on 2007-10-08 12:03:23-07]Ah. Yes, just adding the new definition to the config file won't work
unless you add it AFTER the other definition, because the
%Image::ExifTool::UserDefined hash assignment will be overridden
by the last one in the file. I'm glad this wasn't a W2K problem,
because that was just too weird.
But now we have 3 more problems:
1) I didn't think of this before, but the
-d option is interfering
with copying all tags via
-tagsfromfile ... -all:all because
the time is stripped off all date/time values. This was the same
problem we had with "-FileModifyDate<MyDateTime", but at the time
I didn't realize we would have the problem with all copied date/time
values. Again, this could be solved with a user-defined tag, but the
tag definition would be a bit more complex this time.
2) ExifTool will not change the byte order of existing EXIF information.
Is your original JPG image little-endian? If so, then we have hit an impasse,
because the current version of exiftool can not be used to change this
order with a single command. As you have seen, some image utilities
have problems if the maker notes are a different byte order than the
rest of the EXIF information, but this sort of thing does happen, and
IrfanView should really be able to handle it. (I suggest sending them a
but report and a sample image.)
3) Setting the Quality doesn't work because it is in the makernote information,
and the maker notes are copied as a block. From the exiftool application
documentation:
The maker note information is copied as a block, so it isn't affected
like other information by subsequent tag assignments on the command line. [...]
At this point it looks like you can't combine everything you want to do
into a single command. It was a valiant effort, but the EXIF byte order problem
together with editing a makernote tag necessitate a minimum of 3 passes
with the current version of exiftool.
So in the end it looks like I've failed in my attempts to help you speed up
your batch processing, but on the plus side I think we have both learned
a lot in the process.
Perhaps in a future version of exiftool I will add the features necessary to
accomplish all of this in a single command.
- Phil
[Originally posted by fluschly on 2007-10-09 04:55:56-07]
Hi Phil,
thanks a lot for your very good and fast help.
Yesterday I tried the MyDateTime on my W2K computer and it worked. I think I'll send a bug report with a sample image to the IrfanView developer, because IrfanView should really be able to handle big and little endian files. My original JPG-file is little endian. Is there an option to set the byte-order?
I really learned a lot and sometimes it was really difficult to understand the documentation in detail and use this information in the correct way, eg. setting the quality. The problem is not the documentation but me.
I modified my bat-file and reduced the 6 processing steps to 4. You helped me to speed up my batch processing.
For 197 images the old batch needed 150 s, the new batch needs 115 s. Again thanks.
Maybe I'll come back with my problem when the 'future version' of exiftool is available.
ExifTool is really a great and very powerfull tool.
Regards,
Juergen.
[Originally posted by exiftool on 2007-10-09 10:59:47-07]
Hi Juergen,
I'm glad we had a certain amount of success anyway.
The problem with IrfanView is that (apparently) it can't handle little-endian
maker notes inside big-endian EXIF information.
You can set the ExifByteOrder tag to specify the endianness
of the EXIF when creating a new EXIF segment where none previously
existed. The endianness of the maker notes can not be changed, and
is big-endian for NEF.
- Phil