Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ImageMetaData"/> class
        /// by making a copy from other metadata.
        /// </summary>
        /// <param name="other">
        /// The other <see cref="ImageMetaData"/> to create this instance from.
        /// </param>
        internal ImageMetaData(ImageMetaData other)
        {
            DebugGuard.NotNull(other, nameof(other));

            this.HorizontalResolution = other.HorizontalResolution;
            this.VerticalResolution   = other.VerticalResolution;
            this.FrameDelay           = other.FrameDelay;
            this.DisposalMethod       = other.DisposalMethod;
            this.RepeatCount          = other.RepeatCount;

            foreach (ImageProperty property in other.Properties)
            {
                this.Properties.Add(new ImageProperty(property));
            }

            this.ExifProfile = other.ExifProfile != null
                ? new ExifProfile(other.ExifProfile)
                : null;

            this.IccProfile = other.IccProfile != null
                ? new IccProfile(other.IccProfile)
                : null;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ImageMetaData"/> class
        /// by making a copy from other metadata.
        /// </summary>
        /// <param name="other">
        /// The other <see cref="ImageMetaData"/> to create this instance from.
        /// </param>
        internal ImageMetaData(ImageMetaData other)
        {
            DebugGuard.NotNull(other, nameof(other));

            this.HorizontalResolution = other.HorizontalResolution;
            this.VerticalResolution   = other.VerticalResolution;
            this.Quality     = other.Quality;
            this.FrameDelay  = other.FrameDelay;
            this.RepeatCount = other.RepeatCount;

            foreach (ImageProperty property in other.Properties)
            {
                this.Properties.Add(new ImageProperty(property));
            }

            if (other.ExifProfile != null)
            {
                this.ExifProfile = new ExifProfile(other.ExifProfile);
            }
            else
            {
                this.ExifProfile = null;
            }
        }
Пример #3
0
        /// <summary>
        /// Copies the properties from the other <see cref="IImageBase"/>.
        /// </summary>
        /// <param name="other">
        /// The other <see cref="IImageBase"/> to copy the properties from.
        /// </param>
        protected void CopyProperties(IImageBase other)
        {
            DebugGuard.NotNull(other, nameof(other));

            this.Configuration = other.Configuration;
        }