7 Commits

Author SHA1 Message Date
Dustin Oprea
4bea09dc78 ifd_builder: Can now build a complete chain from existing EXIF.
- ifd_builder:
  - We now validate that `builderTag` instances are either a byte array
    or a child Ifd before allowing to add.
  - Renamed `builderTag.valueBytes` to `builderTag.value` (it's not
    necessarily bytes).
  - `builderTag` now gets the child IFD name if representing a child
    IFD.
  - Added ability to dump structure to string slice.
  - Added NewIfdBuilderFromExistingChain to reconstruct whole chain
    from a read IFD chain (collection).
  - Wrote IB dumper.
  - Added structural tests.
  - Moved ifd_tag_entry types to separate file.

- tags_unknown: Unknown-type tags can now satisfy the `UnknownTagValue`
interface to return `[]byte`.
  - `IfdTagEntry.ValueBytes` automatically uses this. Else, error if not
    `[]byte` or `string`.

- ifd_enumerate
  - Now embed `ByteOrder` in `Ifd` (we otherwise require it to be passed
    a bit too often).

- Renamed some occurences of "IFD" to "IB" where an actual IB in order
  to not be confusing.
2018-04-23 04:53:51 -04:00
Dustin Oprea
67a5e1f548 tags: Now read types.
- Required as the source-of-truth for writing.
2018-04-21 11:17:34 -04:00
Dustin Oprea
917e288adf Refactored byte-ordering to use standard binary.ByteOrder .
- ..rather than unnecessary custom implementation.
2018-04-17 06:18:31 -04:00
Dustin Oprea
53f74d18a1 type: Added encoding and complete encode/parse tests. 2018-04-17 06:06:51 -04:00
Dustin Oprea
42e678f6c2 type: Implemented workflow for undefined-type tags.
- Implemented for the straightforward tags. Noted what had to be done
  for the rest.
2018-04-16 00:30:39 -04:00
Dustin Oprea
172013e0f0 ifd: Implemented recursion. Refactored IFD seeking.
- tags.yaml: Uncommented previously-unhandleable tags.
2018-04-15 23:13:25 -04:00
Dustin Oprea
1511788a4e ifd: Implemented several layers of value processing. Done.
- It's going to be laborious to write unit-tests for, though.
2018-04-15 01:25:30 -04:00