public ParametricCurve(ushort type, byte[] iccData, int index, bool isLittleEndian) { _type = type; g = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, index, isLittleEndian); segmentEnd = index + 4; if (type == 1 || type == 2 || type == 3 || type == 4) { a = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd, isLittleEndian); b = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd + 4, isLittleEndian); segmentEnd = segmentEnd + 4; } if (type == 2 || type == 3 || type == 4) { c = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd, isLittleEndian); segmentEnd = segmentEnd + 4; } if (type == 3 || type == 4) { d = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd, isLittleEndian); segmentEnd = segmentEnd + 4; } if (type == 4) { e = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd, isLittleEndian); f = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, segmentEnd + 4, isLittleEndian); //segmentEnd = idx + 28; } }
public XYZNumber(byte[] arr, int index, bool isLittleEndian) { X = HighEndianReader.GetS15Fixed16NumberToDouble(arr, index, isLittleEndian); Y = HighEndianReader.GetS15Fixed16NumberToDouble(arr, index + 4, isLittleEndian); Z = HighEndianReader.GetS15Fixed16NumberToDouble(arr, index + 8, isLittleEndian); XYZ = new double[3] { X, Y, Z }; }
public override void GetTagData(byte[] iccData, int index, ICCHeader header) { int dataLength = (int)(dataSize - 8) / 4; Data = new double[dataLength]; for (int i = 0; i < dataLength; i++) { int dataIndex = index + i * 4; Data[i] = HighEndianReader.GetS15Fixed16NumberToDouble(iccData, dataIndex, IsLittleEndian) / 256d; } }