Saving Exif Info to New File then Writing from this File to Jpg

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

Previous topic - Next topic

Archive

[Originally posted by brahman on 2007-09-13 21:53:34-07]

Hi,

one of my programs destroys all exif information when doing the noise reduction (picture cooler for windows).

Is it possible to save the exif info to file (exiftool -a -u -g1 -w %%f.%%e.txt %1 seems to work for this stage) and then use the so generated text file to write the exif information back to the file after picture cooler has processed it?

Thank you for your help and your most excellent program.

Kind regards,

Brahman

Archive

[Originally posted by exiftool on 2007-09-14 16:42:09-07]

Hi Brahman,

You can do this, but not with a text file.  Use a MIE file instead.  This file
type stores meta information in native format for all information types,
and can be used to do exactly what you want:

Code:
exiftool -tagsfromfile image.jpg -all:all save.mie
 [edit image.jpg]
 exiftool -tagsfromfile save.mie -all:all image.jpg

Note that I have used "-all:all" in both commands to prevent exiftool
from moving the meta information to different groups since you want
the information to wind up in the same location when you copy it
back again.

- Phil

Archive

[Originally posted by brahman on 2007-09-14 18:16:09-07]

Thank you so much for your help!

Kind Regards,

Brahman

Archive

[Originally posted by brahman on 2007-11-22 16:20:35-08]

Hi Phil,

thanks to your wonderful help from above I am now able to save the Exif info into a MIE file and then again copy it back to the jpg file.

Picture Cooler also has a batch facility. How can I call up a batch file and tell ET to work on all jpgs in a certain folder, and then, when PC finished its batch operation, copy all the MIE files with Exif data to the corresponding files in the subfolder named "batched" which PC created with the denoised images?

Thanks again for your generous help.

Kind regards,

Brahman

Archive

[Originally posted by exiftool on 2007-11-22 17:08:41-08]

This is fairly simple if you don't have images in subdirectories,
but trickier if you do.  Here I will assume that you do because
otherwise there wouldn't be much challenge... Wink

Here is one way to do it:

Code:
exiftool -r -ext jpg -o mie/%%d%%f.mie -all:all .
 [your Picture Cooler batch commands]
 exiftool -r -tagsfromfile mie/%%.7d%%f.mie -all:all batched

The first exiftool command copies all information from jpeg images
based in the current directory to MIE files that it will create in a
hierarchy inside a "mie" directory. (Note the "batched" images should
not exist when this command is run, or it will generate MIE files for
these too.)

The 2nd exiftool command copies the information back from the
MIE files to the images in your "batched" directory.
The "%%.7d" strips the first 7 characters (ie. the word "batched") off
the directory name, and "mie/" is added to the front so exiftool will
look for the MIE files in the "mie" directory instead of the "batched"
directory.

What I have done will only work if you first change directories
to the directory containing the images.  You can do this with a
"cd" command in the batch file if you want.

I suggest you try this out in a test directory.  You may find the
-v option helpful to see what is happening if it isn't
working as you expected.

- Phil

Archive

[Originally posted by brahman on 2007-11-22 21:04:50-08]

Thank you, I will try it out.

What would we do without your expert knowledge? All photographers should be deeply thankful for your work and dedication!

Kind Regards,

Brahman