示例#1
0
        /// <summary>
        /// Copies the properties from the other <see cref="Image{TColor}"/>.
        /// </summary>
        /// <param name="other">
        /// The other <see cref="Image{TColor}"/> to copy the properties from.
        /// </param>
        internal void CopyProperties(Image <TColor> 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);
            }
        }
示例#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="System.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;
            }
        }