ImageMagick.ExifProfile.SetValue C# (CSharp) Метод

SetValue() публичный Метод

Sets the value of the specified tag.
public SetValue ( ExifTag tag, object value ) : void
tag ExifTag The tag of the exif value.
value object The value.
Результат void
    public void SetValue(ExifTag tag, object value)
    {
      foreach (ExifValue exifValue in Values)
      {
        if (exifValue.Tag == tag)
        {
          exifValue.Value = value;
          return;
        }
      }

      ExifValue newExifValue = ExifValue.Create(tag, value);
      _Values.Add(newExifValue);
    }
  }

Usage Example

Пример #1
0
        public bool Save(string rootpath)
        {
            bool success = false;

            ImageMagick.ExifProfile exifprofile = new ImageMagick.ExifProfile();
            exifprofile.SetValue(ExifTag.Copyright, " ©" + Copyright);
            exifprofile.SetValue(ExifTag.Artist, Creator);
            exifprofile.SetValue(ExifTag.ImageDescription, Subject);
            exifprofile.SetValue(ExifTag.Software, Software);
            _image.AddProfile(exifprofile);

            ImageMagick.IptcProfile iptcprofile = new ImageMagick.IptcProfile();
            iptcprofile.SetValue(IptcTag.CopyrightNotice, "No Unauthorized reproduction ©" + Copyright);
            iptcprofile.SetValue(IptcTag.Byline, Creator);
            iptcprofile.SetValue(IptcTag.Country, Country);
            iptcprofile.SetValue(IptcTag.Headline, Headline);
            iptcprofile.SetValue(IptcTag.Keyword, Keywords);
            iptcprofile.SetValue(IptcTag.Source, Source);
            iptcprofile.SetValue(IptcTag.Caption, Subject);
            iptcprofile.SetValue(IptcTag.Title, Title);
            _image.AddProfile(iptcprofile);

            _image.Write(rootpath);
            success = true;

            return(success);
        }
All Usage Examples Of ImageMagick.ExifProfile::SetValue