I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-01-13 16:34:41-08 by snah
function -tagsfromfile for 500+ images
Hello

I have some 500+ panoramic images (PSD) in various folders. For those I wish to add certain EXIF data from one of the source files of the panorama image.
The source files are located one <DIR>-level above the actual panorama.
\converted> -source files (TIF)
\converted\PTGUI> -panoramic files (PSD)

The following comandline does exactly what I want for one panoramic image when executed from the same folder where the PSD-file is located.

exiftool -tagsfromfile ..\img22088.tif -exif:fnumber -exif:exposuretime -exif:datetimeoriginal -exif:createdate 22088-22091.psd

I'd like this command line to be executed for some 500+ panoramic shots. But I am not able to figure out how this could be achieved the best way.
Also I am not sure is '-tagsfromfile' works in conjuction with filelists.
I can create the list of files (DIR *.psd /B /S) to be executed but I don't know how to make the commandline work in order to process for each filename in the filelist.

Below is a portion of the filelist of file to be executed:
G:\IMAGES\2006\12_13 ECC Basel\converted\PTGUI\22088-22091.psd
G:\IMAGES\2006\12_16 ECC Basel\converted\PTGUI\23547-23550_rect.psd
G:\IMAGES\2006\12_16 ECC Basel\converted\PTGUI\23547-23550_sph.psd
G:\IMAGES\2006\12_16 ECC Basel\converted\PTGUI\23604-23606_1_cutout.psd

The files with the relevant EXIF data for each PSD-file are always one level higher in:
G:\IMAGES\2006\12_13 ECC Basel\converted\img22088.tif

The command above represents this with a [..\].

To make things simpler (smile) all TIF files are preceeded by [img] and foldernames contain spaces:
G:\IMAGES\2006\12_13 ECC Basel\converted\img22088.tif
G:\IMAGES\2006\12_13 ECC Basel\converted\img22089.tif
G:\IMAGES\2006\12_13 ECC Basel\converted\img22090.tif
G:\IMAGES\2006\12_13 ECC Basel\converted\img22091.tif

Ideally the commandline should perform the following steps:
1 -find the PSD-file according to the filelist
2 -extract a portion of the PSD-filename (first 5 numbers, eg. '22088')
3 -'move back' one <DIR>-level
4 -use the extracted portion of the PSD-Filename, add [img] in front and [.tif] at the end
5 -find that TIF-file, (eg. img22088.tif)
6 -read EXIF Data from TIF-File
7 -write EXIF Data to PSD-File
8 -proceed to next PSD instance in filelist

I would assume that steps 2-4 could be handled by a filelist containing one TIF filename ('img22088.tif') for each PSD instance (22088-22091.psd).

Now I hope someone has some spare time and is willing to look into this request for a solution.
Also please don't hesitate to contact me if further (or clearer) explanation is needed.

Thank you for your consideration,
Hans

Direct Responses: 6862 | Write a response