Commit Graph

10 Commits (a23c437e5e6134726eb93ae3d8dd89bcf250bfb9)

Author SHA1 Message Date
Dustin Oprea a23c437e5e type_decode: Switch unknown-type processor to read as ACII-non-nul.
- This is the type that we're officially using so this is how we should
  be parsing it.
2018-04-25 15:14:33 -04:00
Dustin Oprea cabbc2fca1 ifd_builder: Added tests for ancillary builder logic. 2018-04-25 04:32:58 -04:00
Dustin Oprea 04631a36c3 ifd_builder: Wrote encoding and allocation logic.
- All of the major design considerations have been covered (unless we
  overlooked something).

- Completely untested.
2018-04-24 05:12:30 -04:00
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 50eafa98d6 ifd_enumerate: Added tests.
- Refactored (IfdTagEntry).ValueBytes() to handle managed undefined
  values.
2018-04-22 02:35:33 -04:00
Dustin Oprea f1f23dca82 General intuitivity refactor. Imp'd (IfdTagEntry).ValueBytes().
- Added some assertions and constants. Renamed from variable so it'd be easy to
  tell if the byte-arrays, even though they come directly from the EXIF, which
  specific offsets they start at (so no remove for confusion during enumeration
  and building).
2018-04-21 20:54:56 -04:00
Dustin Oprea ff7cfacd60 type_decode: Attempted and commented decoding MakerNote as EXIF. 2018-04-21 11:32:27 -04:00
Dustin Oprea a909226514 type_decode: Implemented immediate remaining 'unknown'-type tags.
- Except for MakerNote. We're just going to have to skip that when
  writing, for now.
2018-04-21 03:40:33 -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