Ejemplo n.º 1
0
        private static ProfileTypeA ParseLensCorrectionTypeA(byte[] buffer, ref ulong offset)
        {
            ProfileTypeA data = new ProfileTypeA();

            UInt16[] focalLengths = new UInt16[4];
            focalLengths[0] = GetUInt16(buffer, offset + 0x00);
            focalLengths[1] = GetUInt16(buffer, offset + 0x02);
            focalLengths[2] = GetUInt16(buffer, offset + 0x04);
            focalLengths[3] = GetUInt16(buffer, offset + 0x06);
            offset += 0x08;

            data.UnknownHeaderData = new UInt16[0x0A];
            for (int pos = 0; pos < 0x0A; pos++)
            {
                data.UnknownHeaderData[pos] = GetUInt16(buffer, offset);
                offset += 0x02;
            }

            data.Data = new ProfileTypeAData[4];
            for (int pos = 0; pos < 4; pos++)
            {
                data.Data[pos] = ParseLensCorrectionTypeAData(buffer, ref offset);
                data.Data[pos].FocalLength = focalLengths[pos];
            }

            return data;
        }