Пример #1
0
        /// <summary>
        /// Reads an ICC profile
        /// </summary>
        /// <param name="data">The raw ICC data</param>
        /// <returns>The read ICC profile</returns>
        public IccProfile Read(byte[] data)
        {
            Guard.NotNull(data, nameof(data));
            Guard.IsTrue(data.Length >= 128, nameof(data), "Data length must be at least 128 to be a valid ICC profile");

            var reader = new IccDataReader(data);
            IccProfileHeader header = this.ReadHeader(reader);

            IccTagDataEntry[] tagData = this.ReadTagData(reader);

            return(new IccProfile(header, tagData));
        }