Exemple #1
0
        /// <summary>
        /// Sets the value of the specified tag.
        /// </summary>
        /// <param name="tag">The tag of the EXIF value.</param>
        /// <param name="value">The value.</param>
        public void SetValue(ExifTag tag, object value)
        {
            foreach (ExifValue exifValue in this.Values)
            {
                if (exifValue.Tag == tag)
                {
                    exifValue.Value = value;
                    return;
                }
            }

            var newExifValue = ExifValue.Create(tag, value);

            this.values.Add(newExifValue);
        }
Exemple #2
0
        /// <summary>
        /// Sets the value of the specified tag.
        /// </summary>
        /// <param name="tag">The tag of the EXIF value.</param>
        /// <param name="value">The value.</param>
        public void SetValue(ExifTag tag, object value)
        {
            for (int i = 0; i < this.Values.Count; i++)
            {
                if (this.values[i].Tag == tag)
                {
                    this.values[i] = this.values[i].WithValue(value);

                    return;
                }
            }

            var newExifValue = ExifValue.Create(tag, value);

            this.values.Add(newExifValue);
        }
Exemple #3
0
        private int GetIndex(IList <int> indexes, ExifTag tag)
        {
            foreach (int index in indexes)
            {
                if (this.values[index].Tag == tag)
                {
                    return(index);
                }
            }

            int newIndex = this.values.Count;

            indexes.Add(newIndex);
            this.values.Add(ExifValue.Create(tag, null));
            return(newIndex);
        }