示例#1
0
        /// <summary>
        /// Reads a <see cref="IccMultiProcessElementsTagDataEntry"/>
        /// </summary>
        /// <returns>The read entry</returns>
        public IccMultiProcessElementsTagDataEntry ReadMultiProcessElementsTagDataEntry()
        {
            int start = this.currentIndex - 8;

            this.ReadUInt16();
            this.ReadUInt16();
            uint elementCount = this.ReadUInt32();

            var positionTable = new IccPositionNumber[elementCount];

            for (int i = 0; i < elementCount; i++)
            {
                positionTable[i] = this.ReadPositionNumber();
            }

            var elements = new IccMultiProcessElement[elementCount];

            for (int i = 0; i < elementCount; i++)
            {
                this.currentIndex = (int)positionTable[i].Offset + start;
                elements[i]       = this.ReadMultiProcessElement();
            }

            return(new IccMultiProcessElementsTagDataEntry(elements));
        }
示例#2
0
        /// <summary>
        /// Reads a <see cref="IccProfileSequenceIdentifierTagDataEntry"/>
        /// </summary>
        /// <returns>The read entry</returns>
        public IccProfileSequenceIdentifierTagDataEntry ReadProfileSequenceIdentifierTagDataEntry()
        {
            int  start = this.currentIndex - 8; // 8 is the tag header size
            uint count = this.ReadUInt32();
            var  table = new IccPositionNumber[count];

            for (int i = 0; i < count; i++)
            {
                table[i] = this.ReadPositionNumber();
            }

            var entries = new IccProfileSequenceIdentifier[count];

            for (int i = 0; i < count; i++)
            {
                this.currentIndex = (int)(start + table[i].Offset);
                IccProfileId id = this.ReadProfileId();
                this.ReadCheckTagDataEntryHeader(IccTypeSignature.MultiLocalizedUnicode);
                IccMultiLocalizedUnicodeTagDataEntry description = this.ReadMultiLocalizedUnicodeTagDataEntry();
                entries[i] = new IccProfileSequenceIdentifier(id, description.Texts);
            }

            return(new IccProfileSequenceIdentifierTagDataEntry(entries));
        }