internal void ReadColorantTableTagDataEntry(byte[] data, IccColorantTableTagDataEntry expected) { IccDataReader reader = CreateReader(data); IccColorantTableTagDataEntry output = reader.ReadColorantTableTagDataEntry(); Assert.Equal(expected, output); }
internal void WriteColorantTableTagDataEntry(byte[] expected, IccColorantTableTagDataEntry data) { IccDataWriter writer = CreateWriter(); writer.WriteColorantTableTagDataEntry(data); byte[] output = writer.GetData(); Assert.Equal(expected, output); }
/// <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); foreach (IccColorantTableEntry colorant in value.ColorantData) { count += this.WriteAsciiString(colorant.Name, 32, true); count += this.WriteUInt16(colorant.Pcs1); count += this.WriteUInt16(colorant.Pcs2); count += this.WriteUInt16(colorant.Pcs3); } return(count); }