ExifTool Forum

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

Title: Copying exif tags from one file to another
Post by: Archive on May 12, 2010, 08:54:06 AM
[Originally posted by orakel on 2007-06-30 11:09:39-07]

Code:
Hello,

I hope someone can help me...

I'm trying to use exif tool (batch file mode) and already had some success in extracting JPEGs from my Canon CRW files, adding exif information from the corresponding THM-files, renaming ...

But I have spent hours to solve the problem of correcting e.g. the image sizes of my target files. Because of extracting the exif info from the THMs I get wrong exif entries (ExifImageWidth, ExifImageHeight ...). So I try to correct all files in the directory e.g. by the command

exiftool -TagsFromFile "'-exif:imageheight<exif:rawjpgheight'" %%d%%f.CRW -r -ext JPG "D:\Foto\ExifTool".

Unfortunately without success.
Title: Re: Copying exif tags from one file to another
Post by: Archive on May 12, 2010, 08:54:06 AM
[Originally posted by exiftool on 2007-06-30 17:03:53-07]

The EXIFImageWidth/Length should be set from the actual JPEG
image dimensions (ImageWidth/Height), like this:

Code:
exiftool "-exiftimagewidth<imagewidth" "-exifimagelength<imageheight" -r ext JPG D:\Foto\ExifTool

Part of your problem may be the (oddly named) ExifImageLength tag.  I'm
not sure why they call it Length, but it is the height of the image.

Another problem with your command line is that the -TagsFromFile
 filename (in your case "%%d%%f.CRW") must come immediately after the
-TagsFromFile option, then the tags to copy come afterward.
Note in my command I didn't specify a file to copy the tags from, so
"-TagsFromFile @" (ie. the current file) is assumed.

- Phil
Title: Re: Copying exif tags from one file to another
Post by: Archive on May 12, 2010, 08:54:06 AM
[Originally posted by exiftool on 2007-06-30 17:08:25-07]

Oops.  Forgot a "-" before the "ext" option.  (too bad this forum
doesn't have edit ability.)

- Phil