Ejemplo n.º 1
0
        internal ICCTagTable(byte[] arr)
        {
            int idx = 128;
            //Tag count (byte position 0 to 3)
            TagCount = Helper.GetUInt32(idx);
            Data = new TagTableEntry[TagCount];

            int c = 0;
            int length = (idx + 4) + (12 * (int)TagCount);
            for (int j = idx + 4; j < length; j += 12)
            {
                //Tag signature (byte position 4 to 7 and repeating)
                uint sig = Helper.GetUInt32(j);
                //Offset to beginning of tag data element (byte position 8 to 11 and repeating)
                uint off = Helper.GetUInt32(j + 4);
                //Tag data element size (byte position 12 to 15 and repeating)
                uint size = Helper.GetUInt32(j + 8);

                Data[c] = new TagTableEntry((TagSignature)sig, off, size, c);
                c++;
            }
        }
Ejemplo n.º 2
0
        internal ICCTagTable(byte[] arr)
        {
            int idx = 128;

            //Tag count (byte position 0 to 3)
            TagCount = Helper.GetUInt32(idx);
            Data     = new TagTableEntry[TagCount];

            int c      = 0;
            int length = (idx + 4) + (12 * (int)TagCount);

            for (int j = idx + 4; j < length; j += 12)
            {
                //Tag signature (byte position 4 to 7 and repeating)
                uint sig = Helper.GetUInt32(j);
                //Offset to beginning of tag data element (byte position 8 to 11 and repeating)
                uint off = Helper.GetUInt32(j + 4);
                //Tag data element size (byte position 12 to 15 and repeating)
                uint size = Helper.GetUInt32(j + 8);

                Data[c] = new TagTableEntry((TagSignature)sig, off, size, c);
                c++;
            }
        }
Ejemplo n.º 3
0
 public static TagDataEntry CreateEntry(TagTableEntry entry, ICCHeader header)
 {
     size = (int)entry.DataSize;
     //Tag signature (byte position 0 to 3) (4 to 7 are zero)
     TypeSignature t = (TypeSignature)Helper.GetUInt32((int)entry.Offset);
     return GetEntry(t, (int)entry.Offset + 8, header);
 }