IIptc Interface
Represents base operations intended to work with IPTC metadata. Please find more information at http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council.

Namespace: GroupDocs.Metadata
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 19.5
Syntax
public interface IIptc

The IIptc type exposes the following members.

Properties
  NameDescription
Public propertyHasIptc Obsolete.
Gets a value indicating whether the image contains an IPTC IIM metadata.
Public propertyCode exampleIptcValues
Gets or sets the IPTC metadata package associated with the file.
Methods
  NameDescription
Public methodGetIptc Obsolete.
Gets the IPTC collection.
Public methodRemoveIptc Obsolete.
Removes IPTC metadata from image.
Public methodUpdateIptc(IptcCollection) Obsolete.
Updates IPTC metadata.
Public methodUpdateIptc(IptcDataSet) Obsolete.
Updates specific IPTC dataset.
Examples
Extract basic IPTC metadata properties
C#
using (JpegFormat format = new JpegFormat(@"D:\input.jpg"))
{
    if (format.IptcValues != null)
    {
        if (format.IptcValues.EnvelopeRecord != null)
        {
            Console.WriteLine(format.IptcValues.EnvelopeRecord.Destination);
            Console.WriteLine(format.IptcValues.EnvelopeRecord.FileFormat);
            Console.WriteLine(format.IptcValues.EnvelopeRecord.ServiceIdentifier);

            // ...
        }

        if (format.IptcValues.ApplicationRecord != null)
        {
            Console.WriteLine(format.IptcValues.ApplicationRecord.Urgency);
            Console.WriteLine(format.IptcValues.ApplicationRecord.Contact);
            Console.WriteLine(format.IptcValues.ApplicationRecord.City);

            // ...
        }
    }
}
Examples
Update basic IPTC metadata properties
C#
using (JpegFormat format = new JpegFormat(@"D:\input.jpg"))
{
    // Create a new IPTC package if it's missing
    if (format.IptcValues == null)
    {
        format.IptcValues = new IptcDataSetCollection();
    }

    // Create a new envelop record if it's missing
    if (format.IptcValues.EnvelopeRecord == null)
    {
        format.IptcValues.EnvelopeRecord = new IptcEnvelopeRecord();
    }

    format.IptcValues.EnvelopeRecord.Destination = "test destination";
    format.IptcValues.EnvelopeRecord.ProductID = Guid.NewGuid().ToString();

    // ...

    // Create a new application record if it's missing
    if (format.IptcValues.ApplicationRecord == null)
    {
        format.IptcValues.ApplicationRecord = new IptcApplicationRecord();
    }

    format.IptcValues.ApplicationRecord.City = "test city";
    format.IptcValues.ApplicationRecord.Category = "test category";

    // ...

    format.Save(@"D:\output.jpg");
}
See Also