internal int LoadFieldTextValue <T>(ref IFDField field, List <byte> fileBytes, int fieldDataOffset, int tiffHeaderOffset, Endianness e, int lastBlockByteFileOffset) { if (field.FieldCode == (int)CanonMakerNotesTagCode.CameraSettings1) { return(GetCameraSettings1TextValue(ref field, fileBytes, fieldDataOffset, tiffHeaderOffset, e, lastBlockByteFileOffset)); } else { return(exifProcessor.LoadFieldTextValue <CanonMakerNotesTagCode>(ref field, fileBytes, fieldDataOffset, tiffHeaderOffset, e, lastBlockByteFileOffset)); } }
internal override IFDHeader ParseBytes(List <byte> bytes, Endianness e, int offsetCorrectionIndex) { IFDHeader result = new IFDHeader(typeof(NikonType1MakerNotesTagCode)); byte[] fieldsCountBytes = ByteManager.ChopByteArray(bytes.ToArray(), 8, 2); byte[] sortedFieldsCountBytes = exifProcessor.SortBytes(e, fieldsCountBytes); result.FieldsCount = ByteManager.GetIntValue(sortedFieldsCountBytes); int voided = 0; byte[][] fieldsBytes = exifProcessor.ExtractTagsBytes(ByteManager.ChopByteArray(bytes.ToArray(), 8 + 2, result.FieldsCount * 12).ToList(), result.FieldsCount).ToArray(); foreach (byte[] fieldBytes in fieldsBytes) { IFDField field = exifProcessor.GetIFDField <NikonType1MakerNotesTagCode>(fieldBytes, e); field.Block = IFDHeaderType.MakerNotesHeader; exifProcessor.LoadFieldTextValue <NikonType1MakerNotesTagCode>(ref field, bytes, offsetCorrectionIndex, 0, e, voided); result.IFDFields.Add(field); } return(result); }