/// <summary> /// Reads a <see cref="IccColorantTableTagDataEntry"/> /// </summary> /// <returns>The read entry</returns> public IccColorantTableTagDataEntry ReadColorantTableTagDataEntry() { uint colorantCount = this.ReadUInt32(); IccColorantTableEntry[] cdata = new IccColorantTableEntry[colorantCount]; for (int i = 0; i < colorantCount; i++) { cdata[i] = this.ReadColorantTableEntry(); } return(new IccColorantTableTagDataEntry(cdata)); }
/// <summary> /// Writes a <see cref="IccColorantTableTagDataEntry"/> /// </summary> /// <param name="value">The entry to write</param> /// <returns>The number of bytes written</returns> public int WriteColorantTableTagDataEntry(IccColorantTableTagDataEntry value) { int count = this.WriteUInt32((uint)value.ColorantData.Length); for (int i = 0; i < value.ColorantData.Length; i++) { ref IccColorantTableEntry colorant = ref value.ColorantData[i]; count += this.WriteAsciiString(colorant.Name, 32, true); count += this.WriteUInt16(colorant.Pcs1); count += this.WriteUInt16(colorant.Pcs2); count += this.WriteUInt16(colorant.Pcs3); }