Thanks. Now the script produces output and in the export folder I find
copies of the photographs rather than aliases. However:
1-) During runtime numerous of these errors are issued:
Error: File format error - <filename>
Error: Format error in file - <filename>
Failed to update IPTC data in image <filename>: 0 image files updated
1 files weren't updated due to errors
2-) Using exiftool -list <filename> to check what was actually written
to the files copied by shutil.copy2 I get:
- for files that are actually contained in the iphoto library it works
nicely (Keywords are copied to EXIF tag Keywords and Comments to EXIF
Caption-Abstract)
- for files that are store elsewhere in the hard disk and only linked
in the library, the EXIF fields of interest appear like this (Tags
written by the camera are erased and neither comments nor keywords are
exported):
ExifTool Version Number : 7.97
File Name : Trigonothracia jinxingae
micrograph 005.jpg
Directory : /Users/afs25/Documents/
Anomalodesmata/iphotoexportfolder2/Taxonomically organized/
Trigonothracia jinxingae
File Size : 0 bytes
File Modification Date/Time : 2007:06:15 09:44:35+01:00
Error : File format error
These are the EXIF tags of the original image, for comparison:
ExifTool Version Number : 7.97
File Name : Trigonothracia jinxingae
[micrograph] 005.JPG
Directory : /Users/afs25/Documents/
Anomalodesmata/Images
File Size : 1396 kB
File Modification Date/Time : 2006:09:13 11:34:22+01:00
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Image Description :
Make : NIKON
Camera Model Name : E4500
Orientation : Horizontal (normal)
X Resolution : 300
Y Resolution : 300
Resolution Unit : inches
Software : E4500v1.2
Modify Date : 2006:09:13 09:34:23
Y Cb Cr Positioning : Co-sited
Exposure Time : 1/60
F Number : 3.9
Exposure Program : Manual
ISO : 100
Exif Version : 0220
Date/Time Original : 2006:09:13 09:34:23
Create Date : 2006:09:13 09:34:23
Components Configuration : Y, Cb, Cr, -
Compressed Bits Per Pixel : 3
Exposure Compensation : 0
Max Aperture Value : 2.6
Metering Mode : Multi-segment
Light Source : Cool White Fluorescent
Flash : Off, Did not fire
Focal Length : 20.6 mm
Maker Note Version : 2.00
Color Mode : Color
Quality : Fine
White Balance : Fluorescent
Focus Mode : AF-S
Flash Setting :
ISO Selection : Auto
Image Adjustment : Contrast(+)
Auxiliary Lens : Off
Manual Focus Distance : inf
Digital Zoom : 1
AF Area Mode : Single Area
AF Point : Mid-right
AF Points In Focus : (none)
Scene Mode :
Noise Reduction : Off
Data Dump : (Binary data 254 bytes, use -b
option to extract)
Compression : JPEG (old-style)
Preview Image Start : 14409
Preview Image Length : 12943
User Comment :
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 2272
Exif Image Height : 1704
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
File Source : Digital Camera
Scene Type : Directly photographed
Custom Rendered : Normal
Exposure Mode : Manual
Digital Zoom Ratio : 0
Focal Length In 35mm Format : 99 mm
Scene Capture Type : Standard
Gain Control : None
Contrast : High
Saturation : High
Sharpness : Hard
Subject Distance Range : Unknown
Thumbnail Offset : 4096
Thumbnail Length : 5092
Image Width : 2272
Image Height : 1704
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
Aperture : 3.9
Preview Image : (Binary data 12943 bytes, use -b
option to extract)
Shutter Speed : 1/60
Thumbnail Image : (Binary data 5092 bytes, use -b
option to extract)
Image Size : 2272x1704
Light Value : 9.8
Scale Factor To 35 mm Equivalent: 4.8
Circle Of Confusion : 0.006 mm
Field Of View : 20.6 deg
Focal Length : 20.6 mm (35 mm equivalent: 99.0 mm)
Hyperfocal Distance : 17.40 m
Thanks for your help.
Cheers,
Andre