Adds or changes an item of IPTC information.

 

   
Syntax
 
     

[VBScript]
outItem = GraphicIPTC.Add(inField, inRepl)

 

   
Params
 
     
Name   Type   Description
inField String The field to be modified.
inRepl Boolean Whether to replace any existing fields of the same name.
outItem IPTCItem The item which was added.

 

   
Notes
 
     

Use this method to add a new item of information.

You can refer to fields either using the common names or using a more formal "Record:DataSet" format as defined in the IPTC specification.

For example the "Headline" field is defined as part of Record 2 DataSet 105. This means you can use either of the following two methods to enter a headline.

iptc.Add("Headline", True).Text = "Oxford University Ball"
iptc.Add("2:105", True).Text = "Oxford University Ball"

The IPTC specification allows you to embed more than one field with the same name. When dealing with fields such as headlines or captions you will typically want to replace any existing fields. However for some types of data such as keywords, you may wish to add to an existing set of entries rather than replace them all.

ImageGlue recognizes the following common names:

  • "Record Version"
  • "Object Type Reference"
  • "Object Attribute Reference"
  • "Object Name"
  • "Edit Status"
  • "Editorial Update"
  • "Urgency"
  • "Subject Reference"
  • "Category"
  • "Supplemental Category"
  • "Fixture Identifier"
  • "Keyword"
  • "Content Location Code"
  • "Content Location Name"
  • "Release Date"
  • "Release Time"
  • "Expiration Date"
  • "Expiration Time"
  • "Special Instructions"
  • "Action Advised"
  • "Reference Service"
  • "Reference Date"
  • "Reference Number"
  • "Date Created"
  • "Time Created"
  • "Digital Creation Date"
  • "Digital Creation Time"
  • "Originating Program"
  • "Program Version"
  • "Object Cycle"
  • "Byline"
  • "Byline Title"
  • "City"
  • "Sub-location"
  • "Province-State"
  • "Country Code"
  • "Country Name"
  • "Original Transmission Reference"
  • "Headline"
  • "Credit"
  • "Source"
  • "Copyright Notice"
  • "Contact"
  • "Caption"
  • "Local Caption"
  • "Caption Writer"
  • "Image Type"
  • "Image Orientation"
  • "Language Identifier"
  • "Audio Type"
  • "Audio Sampling Rate"
  • "Audio Sampling Resolution"
  • "Audio Duration"
  • "Audio Outcue"
  • "ObjectData Preview File Format"
  • "ObjectData Preview File Format Version"
  • "ObjectData Preview Data"

Note that information changes are not applied until the Embed method is called.

 

   
See Also
 
     

Graphic Embed method.

 

   
Example
 
     

[VBScript]
Set gr = Server.CreateObject("ImageGlue7.Graphic")
gr.IPTC.Add("Headline", True).Text = "What a Regatta!"
Set ca = Server.CreateObject("ImageGlue7.Canvas")
ca.DrawFile Server.MapPath("../images/house.tif"), ""
theData = ca.GetAs("dummy.jpg", "")
gr.IPTC.Add("Keyword", True).Text = "boat"
gr.IPTC.Add("Keyword", False).Text = "sea"
gr.IPTC.Add("Keyword", False).Text = "naval"
theData = gr.IPTC.Embed(theData)
'... insert theData as BLOB

This example draws a TIFF into a canvas. It then gets the canvas contents in JPEG format and embeds a headline and some keywords into the image. Finally it writes the data to a database (code not shown).