ImageMagick.IptcProfile.SetValue C# (CSharp) Method

SetValue() public method

Sets the value of the specified tag.
public SetValue ( IptcTag tag, string value ) : void
tag IptcTag The tag of the iptc value.
value string The value.
return void
    public void SetValue(IptcTag tag, string value)
    {
      SetValue(tag, Encoding.UTF8, value);
    }
  }

Same methods

IptcProfile::SetValue ( IptcTag tag, Encoding encoding, string value ) : void

Usage Example

Esempio n. 1
1
    public void Test_IptcProfile()
    {
      using (MagickImage input = new MagickImage(Files.MagickNETIconPNG))
      {
        IptcProfile profile = input.GetIptcProfile();
        Assert.IsNull(profile);

        profile = new IptcProfile();
        profile.SetValue(IptcTag.Headline, "Magick.NET");
        profile.SetValue(IptcTag.CopyrightNotice, "Copyright.NET");

        input.AddProfile(profile);

        using (MemoryStream memStream = new MemoryStream())
        {
          input.Format = MagickFormat.Tiff;
          input.Write(memStream);

          memStream.Position = 0;
          using (MagickImage output = new MagickImage(memStream))
          {
            profile = output.GetIptcProfile();
            Assert.IsNotNull(profile);
            TestValue(profile, IptcTag.Headline, "Magick.NET");
            TestValue(profile, IptcTag.CopyrightNotice, "Copyright.NET");
          }
        }
      }
    }
All Usage Examples Of ImageMagick.IptcProfile::SetValue