Deletes an item of IPTC information.
Syntax

[C#]

void Delete(string inField);

[Visual Basic]

Sub Delete(inField As String)
Params
Name Description
inField The field to be deleted.
Notes

Use this method to delete an existing IPTC field.

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 more details see Add.

When you delete an item referred to by name, all IPTC items with that name are deleted. For example if you call this method with the parameter "keyword" this will delete all keywords in the information set.

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

See Also

Embed

Add

Example

[C#]

string theFile = Server.MapPath("rez/iptc.jpg");
XImageLoadOptions loadOptions = new XImageLoadOptions();
loadOptions.ReadIPTC = true;
XImage image = XImage.FromFile(theFile, loadOptions);
if (image.IPTC != null) {
  image.IPTC.Delete("Headline");
  image.IPTC.Delete("2:110"); // Credit
  image.IPTC.Embed(theFile);
}


[Visual Basic]

Dim theFile As String = Server.MapPath("rez/iptc.jpg")
Dim loadOptions As New XImageLoadOptions()
loadOptions.ReadIPTC = True
Dim image As XImage = XImage.FromFile(theFile, loadOptions)
If image.IPTC IsNot Nothing Then
  image.IPTC.Delete("Headline")
  image.IPTC.Delete("2:110")
  ' Credit
  image.IPTC.Embed(theFile)
End If


The code reads the IPTC information from a JPEG file. It deletes the headline and credit and updates the file.