public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Value.Load(buffer); }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Value = System.Text.Encoding.ASCII.GetString(buffer.ReadBytes((int)Table.ElementSize - 8)); }
internal void Load(Bytes.Buffer buffer) { SettingId = (ICCDeviceSettingsIds)buffer.ReadUnsignedInt(); Size = buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); Values = new ICCDeviceSettingValue[Count]; for (int i = 0; i < Count; i++) { var settingValue = (ICCDeviceSettingValue)null; if (SettingId == ICCDeviceSettingsIds.Resolution) { settingValue = new ICCDeviceSettingResolutiuon(); } if (SettingId == ICCDeviceSettingsIds.MediaType) { settingValue = new ICCDeviceSettingMediaType(); } if (SettingId == ICCDeviceSettingsIds.Halftone) { settingValue = new ICCDeviceSettingHalftone(); } settingValue.Load(buffer); Values[i] = settingValue; } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Illuminant.Load(buffer); Surround.Load(buffer); MeasurmentType = buffer.ReadUnsignedInt(); }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); var count = (int)Table.ElementSize - 8; Value = buffer.ReadBytes(count); }
public void Load(Bytes.Buffer buffer) { DeviceManufacturer = buffer.ReadUnsignedInt(); DeviceModel = buffer.ReadUnsignedInt(); DeviceAttributes.Load(buffer); DeviceTechnology = buffer.ReadUnsignedInt(); ManufacturerDescription = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); ModelDescription = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); DataFlag = buffer.ReadUnsignedInt(); ByteValue = new byte[Table.ElementSize - 12]; if (DataFlag == 0x00000000) { StringValue = System.Text.Encoding.ASCII.GetString(ByteValue); } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); VendorSpecificFlag = buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); Prefix = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); Suffix = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); FirstColor = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); //....color coordinates. Color space of data }
internal void Load(Bytes.Buffer buffer) { Size = buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); Setttings = new ICCDeviceSetting[Count]; for (int i = 0; i < Count; i++) { var setting = new ICCDeviceSetting(); setting.Load(buffer); Setttings[i] = setting; } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); var count = (Table.ElementSize - 8) / 4; Value = new float[count]; for (int i = 0; i < count; i++) { Value[i] = buffer.ReadFixed32(); } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Flag = (ICCScreeningFlag)buffer.ReadUnsignedInt(); NumberOfChannels = buffer.ReadUnsignedInt(); Channels = new ICCScreeningChannel[NumberOfChannels]; for (int i = 0; i < NumberOfChannels; i++) { Channels[i].Load(buffer); } }
internal void Load(Bytes.Buffer buffer) { PlatformId = (ICCPrimaryPlatformSignatures)buffer.ReadUnsignedInt(); Size = buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); SetttingCombinations = new ICCDeviceSettingsCombination[Count]; for (int i = 0; i < Count; i++) { var setting = new ICCDeviceSettingsCombination(); setting.Load(buffer); SetttingCombinations[i] = setting; } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); for (int i = 0; i < Count; i++) { var structure = new ICCProfileDescriptionStructure(); structure.Load(buffer); Structures.Add(structure); } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); Count = buffer.ReadUnsignedInt(); Description = System.Text.Encoding.ASCII.GetString(buffer.ReadBytes((int)Count)); UnicodeCode = buffer.ReadUnsignedInt(); UnicodeCount = buffer.ReadUnsignedInt(); ScriptcodeCode = buffer.ReadUnsignedShort(); ScriptcodeCount = (byte)buffer.ReadByte(); MacDescription = System.Text.Encoding.ASCII.GetString(buffer.ReadBytes(67)); }
public void Load(Bytes.Buffer buffer, ushort numberOfChannels) { MesurementUnit = (ICCCurveMeasurementEncodings)buffer.ReadUnsignedInt(); Counts = new uint[numberOfChannels]; Measurments = new ICCXYZNumber[numberOfChannels]; Responces = new ICCResponse16Number[numberOfChannels]; for (int i = 0; i < numberOfChannels; i++) { Counts[i] = buffer.ReadUnsignedInt(); } for (int i = 0; i < numberOfChannels; i++) { Measurments[i].Load(buffer); } for (int i = 0; i < numberOfChannels; i++) { Responces[i].Load(buffer); } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); NumberOfChannels = buffer.ReadUnsignedShort(); CountTypes = buffer.ReadUnsignedShort(); Offsets = new uint[CountTypes]; for (int i = 0; i < CountTypes; i++) { Offsets[i] = buffer.ReadUnsignedInt(); } for (int i = 0; i < CountTypes; i++) { var structure = new ICCCurveStructure(); structure.Load(buffer, NumberOfChannels); Structures.Add(structure); } }
public override void Load(Bytes.Buffer buffer) { buffer.Seek(Table.Offset); buffer.ReadUnsignedInt(); buffer.ReadUnsignedInt(); CountUCRCurves = buffer.ReadUnsignedInt(); UCRCurves = new ushort[CountUCRCurves]; for (int i = 0; i < CountUCRCurves; i++) { UCRCurves[i] = buffer.ReadUnsignedShort(); } CountBGCurves = buffer.ReadUnsignedInt(); BGCurves = new ushort[CountBGCurves]; for (int i = 0; i < CountBGCurves; i++) { BGCurves[i] = buffer.ReadUnsignedShort(); } Charactes = System.Text.Encoding.ASCII.GetString(buffer.ReadNullTermitaded()); }
public static ICCProfile Load(byte[] data) { var profile = new ICCProfile(); var header = new ICCHeader(); var buffer = new Bytes.Buffer(data); header.ProfileSize = buffer.ReadUnsignedInt(); header.CMMTypeSignature = buffer.ReadUnsignedInt(); header.ProfileVersionNumber.Major = (byte)buffer.ReadByte(); header.ProfileVersionNumber.Minor = (byte)buffer.ReadByte(); header.ProfileVersionNumber.Reserv1 = (byte)buffer.ReadByte(); header.ProfileVersionNumber.Reserv2 = (byte)buffer.ReadByte(); header.ProfileDeviceClassSignature = (ICCProfileDeviceSignatures)buffer.ReadUnsignedInt(); header.ColorSpaceOfData = (ICCColorSpaceSignatures)buffer.ReadUnsignedInt(); header.ProfileConnectionSpace = (ICCColorSpaceSignatures)buffer.ReadUnsignedInt(); header.DateCreated.Load(buffer); header.acsp = buffer.ReadUnsignedInt(); header.PrimaryPlatformSignature = (ICCPrimaryPlatformSignatures)buffer.ReadUnsignedInt(); header.Flags = (ICCProfileFlags)buffer.ReadUnsignedInt(); header.DeviceManufacturer = buffer.ReadUnsignedInt(); header.DeviceModel = buffer.ReadUnsignedInt(); header.DeviceAttributes.Load(buffer); header.RenderingIntent.Intents = buffer.ReadUnsignedShort(); header.RenderingIntent.Reserved = buffer.ReadUnsignedShort(); header.XYZ.Load(buffer); header.ProfileCreatorSignature = buffer.ReadUnsignedInt(); header.FutureUse = new byte[44]; buffer.Read(header.FutureUse); profile.Header = header; var tagCount = buffer.ReadUnsignedInt(); for (int i = 0; i < tagCount; i++) { var tag = new ICCTagTable(); tag.Signature = (ICCTagTypes)buffer.ReadUnsignedInt(); tag.Offset = buffer.ReadUnsignedInt(); tag.ElementSize = buffer.ReadUnsignedInt(); profile.Tags[tag.Signature] = tag; } foreach (var tagTable in profile.Tags.Values) { buffer.Seek(tagTable.Offset); var key = buffer.ReadUnsignedInt(); if (Types.TryGetValue(key, out var type)) { tagTable.Tag = (ICCTag)Activator.CreateInstance(type, tagTable); tagTable.Tag.Profile = profile; tagTable.Tag.Load(buffer); } } return(profile); }
public void Load(Bytes.Buffer buffer) { Value = (ICCDeviceSettingsHalftone)buffer.ReadUnsignedInt(); }
public void Load(Bytes.Buffer buffer) { Frequency = buffer.ReadFixed32(); ScreenAngle = buffer.ReadFixed32(); SpotShape = (ICCScreeningSpotEncodings)buffer.ReadUnsignedInt(); }
public void Load(Bytes.Buffer buffer) { Value = (ICCDeviceSettingMediaTypes)buffer.ReadUnsignedInt(); }