Exemple #1
0
        /// <summary>
        /// Copies the properties from the other <see cref="Image{T,TP}"/>.
        /// </summary>
        /// <param name="other">
        /// The other <see cref="Image{T,TP}"/> to copy the properties from.
        /// </param>
        internal void CopyProperties(Image <T, TP> other)
        {
            base.CopyProperties(other);

            this.HorizontalResolution = other.HorizontalResolution;
            this.VerticalResolution   = other.VerticalResolution;
            this.CurrentImageFormat   = other.CurrentImageFormat;
            this.RepeatCount          = other.RepeatCount;

            if (other.ExifProfile != null)
            {
                this.ExifProfile = new ExifProfile(other.ExifProfile);
            }
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ExifProfile"/> class
        /// by making a copy from another EXIF profile.
        /// </summary>
        /// <param name="other">The other EXIF profile, where the clone should be made from.</param>
        /// <exception cref="ArgumentNullException"><paramref name="other"/> is null.</exception>
        public ExifProfile(ExifProfile other)
        {
            Guard.NotNull(other, nameof(other));

            this.Parts           = other.Parts;
            this.thumbnailLength = other.thumbnailLength;
            this.thumbnailOffset = other.thumbnailOffset;
            this.invalidTags     = new List <ExifTag>(other.invalidTags);
            if (other.values != null)
            {
                this.values = new Collection <ExifValue>();
                foreach (ExifValue value in other.values)
                {
                    this.values.Add(new ExifValue(value));
                }
            }
            else
            {
                this.data = other.data;
            }
        }