private void WriteTagTable(ICCDataWriter writer, TagTableEntry[] table) { //128 = size of ICC header writer.DataStream.Position = 128; writer.WriteUInt32((uint)table.Length); foreach (var entry in table) { writer.WriteUInt32((uint)entry.Signature); writer.WriteUInt32(entry.Offset); writer.WriteUInt32(entry.DataSize); } }
private void WriteHeader(ICCDataWriter writer, ICCProfile profile) { writer.DataStream.Position = 0; writer.WriteUInt32(profile.Size); writer.WriteASCIIString(profile.CMMType, 4); writer.WriteVersionNumber(profile.Version); writer.WriteUInt32((uint)profile.Class); writer.WriteUInt32((uint)profile.DataColorspace); writer.WriteUInt32((uint)profile.PCS); writer.WriteDateTime(profile.CreationDate); writer.WriteASCIIString(profile.FileSignature, 4); writer.WriteUInt32((uint)profile.PrimaryPlatformSignature); writer.WriteProfileFlag(profile.Flags); writer.WriteUInt32(profile.DeviceManufacturer); writer.WriteUInt32(profile.DeviceModel); writer.WriteDeviceAttribute(profile.DeviceAttributes); writer.WriteUInt32((uint)profile.RenderingIntent); writer.WriteXYZNumber(profile.PCSIlluminant); writer.WriteASCIIString(profile.CreatorSignature, 4); }