ImageMagick.IptcProfile.GetValue C# (CSharp) Method

GetValue() public method

Returns the value with the specified tag.
public GetValue ( IptcTag tag ) : IptcValue
tag IptcTag The tag of the iptc value.
return IptcValue
    public IptcValue GetValue(IptcTag tag)
    {
      foreach (IptcValue iptcValue in Values)
      {
        if (iptcValue.Tag == tag)
          return iptcValue;
      }

      return null;
    }

Usage Example

Example #1
0
 private static void TestValue(IptcProfile profile, IptcTag tag, string expectedValue)
 {
   IptcValue value = profile.GetValue(tag);
   Assert.IsNotNull(value);
   Assert.AreEqual(expectedValue, value.Value);
 }