|
I run the following script to clear XMP data:
##---------------------------------------------------------------------
## Clear XMP Fields
##---------------------------------------------------------------------
sub ClearXMP(){
$exifTool->SetNewGroups('XMP');
$exifTool->SetNewValue('XMP-dc:Title' => '');
$exifTool->SetNewValue('XMP-photoshop:Urgency' => '0');
$exifTool->SetNewValue('XMP-photoshop:SupplementalCategories' => '');
$exifTool->SetNewValue('XMP-dc:Subject' => '');
$exifTool->SetNewValue('XMP-photoshop:Instructions' => '');
$exifTool->SetNewValue('XMP-dc:creator' => '');
$exifTool->SetNewValue('XMP-photoshop:AuthorsPosition' => '');
$exifTool->SetNewValue('XMP-photoshop:City' => '');
$exifTool->SetNewValue('XMP-photoshop:State' => '');
$exifTool->SetNewValue('XMP-photoshop:Country' => '');
$exifTool->SetNewValue('XMP-photoshop:Headline' => '');
$exifTool->SetNewValue('XMP-photoshop:Credit' => '');
$exifTool->SetNewValue('XMP-photoshop:Source' => '');
$exifTool->SetNewValue('XMP-dc:Description' => '');
$exifTool->SetNewValue('XMP-photoshop:CaptionWriter' => '');
$exifTool->SetNewValue('XMP-photoshop:TransmissionReference' => '');
$exifTool->SetNewValue('XMP-photoshop:Category' => '');
$iUpdate = $exifTool->WriteInfo("$imagePath$file","$imagePath.$file",'XMP');
if($iUpdate > 0){
system("move /Y $imagePath.$file $imagePath$file");
} else {
print "XMP Clear Failed image->$imagePath$file\n";
}
}
When I write data back to the XMP I get the following:
XMP DATA
------------------------------------------------
AuthorsPosition :
CaptionWriter : CHIEF YEOMAN ALPHONSO BRAGGS
Category :
City : ARTIC CIRCLE
Country :
Creator : , CHIEF YEOMAN ALPHONSO BRAGGS
Credit :
DateCreated : 2004:01:15
Description : As seen through the periscope of the
Los Angeles-class fast attack submarine USS HONOLULU (SSN 718), a polar bear inv
estigates the open water around the submarine's rudder, while surfaced 280 miles
from the North Pole in the Artic Circle, Oct. 2003. Commanded by Cmdr. Charles
Harris, HONOLULU while conducting otherwise classified operations in the Arctic,
collected scientific data and water samples for U.S. and Canadian Universities
as part of an agreement with the Artic Submarine Laboratory (ASL) and the Nation
al Science Foundation (NSF). HONOLULU is the 24th Los Angeles-class submarine,
and the first original design in her class to visit the North Pole region. HONO
LULU is as assigned to Commander Submarine Pacific, Submarine Squadron Three, Pe
arl Harbor, Hawaii. (U.S. Navy photo by Chief Yeoman Alphonso Braggs) (Released
)
Headline :
Instructions : credit as U.S Navy photo by Alphonso Braggs
Source : NAVY VISUAL NEWS SERVICE
State :
Subject : , NAVY ,POLAR BEARS ,SSN 718 ,UNCLASS, IFIED ,USS HONLULU
SupplementalCategories :
Title : 0310XX-N-XXXXB-002
TransmissionReference :
Urgency : 0
The following fields are displayed, but contain no data:
AuthorsPosition
Category
Country
Credit
Headline
State
SupplementalCategories
TransmissionReference
Any Ideas?
|