|
Phil:
We're getting close. But I'm still not able to set any values. I tried your code exactly from the post above and also changed the field to one I knew my camera had. So, to simplify the discussion, I've changed the code to this, still doesn't work:
-----------------------------------------------------------------------
#!/usr/bin/perl -w
use Image::ExifTool 'ImageInfo';
#use IO::File;
#use Time::Local;
my $exifTool = new Image::ExifTool;
$photodirectory = "/Volumes/d\$/PhotoMaster/rawtest/";
$file = "20060429-30D-IMG_4892test.CR2";
my $info = $exifTool->ImageInfo($photodirectory.$file);
$exifTool->SetNewValue("ImageDescription", "A499JKLLL");
$exifTool->WriteInfo($photodirectory.$file);
exit;
-----------------------------------------------------------------------
Also, using this code, here are the values I'm getting out of my files:
foreach (keys %$info) {
print "$_: $info->{$_}\n";
}
-----------------------------------------------------------------------
WhiteBalance (1): Auto
FocalPlaneYSize: 15.37mm
BulbDuration: 0
TimeCreated: 12:38:24-08:00
FlashFiring: Fires
SensorHeight: 2360
ShootingMode: Shutter Speed Priority AE
CopyrightNotice: Copyright 2006 Greg Keene, All Rights Reserved.
SensorBlueLevel: 0
WB_RGGBLevelsFluorescent: 1853 1057 1057 2352
FNumber (1): 11
Source: SourceValue
BitsPerSample: 8 8 8
Rights: Copyright 2006 Greg Keene, All Rights Reserved.
ZoomTargetWidth: 0
MIMEType: image/x-raw
WB_RGGBLevelsPC1: 8191 1056 1056 512
MirrorLockup: Disable
LensType: EF100-400mm f/4.5-5.6L IS USM
Compression (1): JPEG (old-style)
FileType: CR2
Credit (1): CreditValue
FlashActivity: 0
MagnifiedView: Image playback only
ImageHeight: 1152
DateTimeOriginal: 2006:04:29 12:38:24
WB_RGGBLevelsKelvin: 2060 1024 1024 1535
FocusDistanceUpper: 0
ISO (1): 400
PhotoEffect: Off
ScaleFactor35efl: 1.6
ColorTempCloudy: 6000
Marked: True
By-lineTitle: TitleValue
ComponentsConfiguration:
WBShiftAB: 0
ColorTempMeasured: 5893
Saturation: Normal
BracketMode: Off
WhiteBalanceRed: 0
WB_RGGBLevelsAuto: 2189 1024 1024 1402
RedBalance: 2.137695
ModifyDate: 2006:04:29 12:38:24
CanonImageWidthAsShot: 3504
FocalLength: 400.0mm
ColorTempPC2: 3761
Credit: CreditValue
MeteringMode (1): Multi-segment
WhiteBalance: Auto
Urgency (1): 5
Lens: 100.0 - 400.0mm
SensorWidth: 3596
SafetyShiftInAvOrTv: Disable
ExposureTime: 1/250
HyperfocalDistance: 756.35 m
WB_RGGBLevelsShade: 2372 1024 1024 1268
CircleOfConfusion: 0.019 mm
FlashExposureComp: 0
ExposureTime (1): 1/256
Compression: JPEG (old-style)
CanonFlashMode: Off
ThumbnailLength: 8152
ShortFocal: 100
WBBracketValueAB: 0
ColorSpace (1): sRGB
Caption-Abstract: Coye Francies before the Spring game.
DigitalZoom: None
ObjectName: ObjectName
DateCreated (1): 2006:04:29
ExposureMode: Auto
CanonImageType: Canon EOS 30D
XResolution: 72
StripOffsets (1): 449776
SensorRightBorder: 3587
ColorTempAuto: 5893
ShutterCount: 2033254592
TimeCreated (1): 123824-0800
EasyMode: Manual
ETTLII: Evaluative
WB_RGGBLevelsPC2: 8191 1056 1056 512
UserComment:
FocusDistanceLower: 0
ExposureCompensation: 0
ColorSpace: sRGB
Title: ObjectName
FlashGuideNumber: 0
WB_RGGBLevels: 2189 1024 1024 1402
SequenceNumber: 0
LensAFStopButton: AF stop
WBBracketValueGM: 0
Sharpness: +3
CustomRendered: Normal
RawJpgQuality: Fine
ISOExpansion: On
ExposureLevelIncrements: 1/3 Stop
CanonExposureMode: Shutter Speed Priority AE
FocalPlaneXResolution: 3959.322
StripByteCounts: 7089343
SensorBottomBorder: 2354
ExifImageLength: 2336
ColorTempShade: 7000
StripByteCounts (1): 294912
DigitalGain: 0
FocusRange: Not Known
WB_RGGBLevelsDaylight: 2060 1024 1024 1535
BracketShotNumber: 0
SensorTopBorder: 19
ColorTone: Normal
FocalType: Zoom
AFAssistBeam: Emits
ApplicationRecordVersion: 3
Self-timer2: 0
ThumbnailOffset: 76800
ColorTempAsShot: 5893
LongExposureNoiseReduction: Off
FlashSyncSpeedAv: Auto
Model: Canon EOS 30D
FlashpixVersion: 0100
ShutterSpeed: 1/250
CanonModelID: EOS 30D
ResolutionUnit: inches
FocalLength35efl: 400.0mm (35mm equivalent: 625.0mm)
CanonImageHeightAsShot: 2336
MeteringMode: Evaluative
MaxAperture: 5.6
InteropVersion: 0100
WB_RGGBLevelsMeasured: 2187 1024 1023 1400
SamplesPerPixel: 3
WBBracketMode: Off
SerialNumber: 0420300677
WB_RGGBLevelsAsShot: 2189 1024 1024 1402
Source (1): SourceValue
ExifToolVersion: 6.15
DateTimeCreated: 2006:04:29 12:38:24-08:00
StripOffsets: 744688
ISO: 400
Directory: /Volumes/d$/PhotoMaster/rawtest
PlanarConfiguration: Chunky
Make: Canon
MacroMode: Normal
ImageDescription: Coye Francies before the Spring game.
InteropIndex: R98
LensType (1): Unknown (-1)
BlueBalance: 1.369141
ApertureValue: 11.0
ExposureCompensation (1): 0
PhotometricInterpretation: RGB
ExifImageWidth: 3504
MinAperture: 38
ExposureProgram: Shutter speed priority AE
SensorLeftBorder: 84
WB_RGGBLevelsFlash: 2250 1024 1024 1348
FocalUnits: 1
Compression (2): JPEG (old-style)
PreviewImageLength: 364824
ColorTemperature: 5200
FocalPlaneXSize: 23.04mm
Quality: RAW
DriveMode: Continuous shooting
WB_RGGBLevelsCloudy: 2222 1024 1024 1391
ColorTempKelvin: 5210
Lens35efl: 100.0 - 400.0mm (35mm equivalent: 156.2 - 625.0mm)
SuperimposedDisplay: On
FocusMode: AI Servo AF
AEBBracketValue: 0
Flash: Off
PreviewImage: SCALAR(0x186f924)
ShutterSpeedValue: 1/250
CanonImageSize: Unknown (-1)
PictureStyle: Standard
Orientation: Horizontal (normal)
FocalLength (1): 400mm
BracketValue: 0
WB_RGGBLevelsTungsten: 1537 1095 1095 2595
ExifVersion: 0221
ColorTempTungsten: 3200
ColorTempFluorescent: 3752
ImageSize: 1728x1152
ColorTempPC3: 3761
DateCreated: 2006:04:29
WB_RGGBLevelsCustom: 2060 1024 1024 1535
ThumbnailImage: SCALAR(0x19300b4)
FocusContinuous: Continuous
Contrast: Normal
SensorRedLevel: 0
SlowShutter: None
ImageWidth: 1728
CanonImageWidth: 3504
ColorTempDaylight: 5200
WB_RGGBLevelsPC3: 8191 1056 1056 512
Keywords: OSU, Beavers, Spring Practice, Football, Spring, OSU Beavers, Oregon State University, Be
+averPigSkin, 2006, BeaversSpring20060429, Game, Spring Game, Coye Francies
ImageHeight (1): 256
PreviewImageStart: 84952
ToneCurve: Standard
ImageWidth (1): 384
ZoomSourceWidth: 0
SharpnessFrequency: n/a
ColorTempCustom: 5210
ContinuousDrive: Continuous, Low
SerialNumberFormat: Format 2
ColorTempFlash: 6290
RowsPerStrip: 256
Subject: OSU, Beavers, Spring Practice, Football, Spring, OSU Beavers, Oregon State University, Bea
+verPigSkin, 2006, BeaversSpring20060429, Game, Spring Game, Coye Francies
WhiteBalanceBlue: 0
FocalPlaneYResolution: 3959.322
BitsPerSample (1): 8 8 8
FileName: 20060429-30D-IMG_4892test.CR2
FlashBits: (none)
AEBSequence: 0,-,+/Enabled
AFPointSelectionMethod: Normal
TargetAperture: 11
TargetExposureTime: 1/256
CreateDate: 2006:04:29 12:38:24
WBShiftGM: 0
AddOriginalDecisionData: Off
FileModifyDate: 2006:05:24 12:06:36
AutoRotate: None
Urgency: 5
LongFocal: 400
ColorTempPC1: 3761
AuthorsPosition: TitleValue
CanonImageHeight: 2336
RawJpgSize: Medium
SceneCaptureType: Standard
ShutterCurtainSync: 1st-curtain sync
FileSize: 7 MB
ToningEffect: None
AutoExposureBracketing: Off
YResolution: 72
FilterEffect: None
Aperture: 11.0
FocalPlaneResolutionUnit: inches
FlashOn: Off
SetFunctionWhenShooting: Default (no function)
FNumber: 11.0
MenuButtonDisplayPosition: Previous (top if power off)
CanonFirmwareVersion: Firmware 1.0.4
Self-timer: 0
Shutter-AELock: AF/AE lock
NoiseReduction: Off
Description: Coye Francies before the Spring game.
OwnerName: unknown
-----------------------------------------------------------------------
Thanks again for all your help.
Best regards,
Greg
|