Commit Graph

184 Commits (fb1db098b9bba80b19caff8227373f78d89b8472)

Author SHA1 Message Date
Dustin Oprea 98b3d60a12 type: Added encode and decode tests for all types but undefined.
- Updated `(TagType).Encode()` to use the byte-order it already has.
- TODO: Add tests for TypeUndefined.
2018-05-05 15:15:17 -04:00
Dustin Oprea 7166faa0be type: Renamed `ValueBytes()` to `Encode()`. 2018-05-05 02:17:43 -04:00
Dustin Oprea 6c71ccf651 ifd_builder_encode: Bugfixed next-IFD offsets.
- Affected sibling IFDs.
2018-05-05 02:01:18 -04:00
Dustin Oprea 887842e85a ifd_enumerate: Improved `DumpTree()`. 2018-05-05 01:58:00 -04:00
Dustin Oprea ea8e174374 ifd_builder_encode: Simplified arithmetic on IFD encode. 2018-05-05 01:03:00 -04:00
Dustin Oprea a3f14b2e42 ifd_builder_encode: Extended test to allocate multiple child IFDs.
- Want to be sure that the arithmetic to bump the offsets works.
2018-05-05 00:28:28 -04:00
Dustin Oprea 4e0ba639f9 ifd_builder_encode: Replaced `EntrySize()` with a constant. 2018-05-05 00:15:59 -04:00
Dustin Oprea 306b314f7a ifd_tag_entry: Added test. 2018-05-04 18:40:35 -04:00
Dustin Oprea b18da0cc3d ifd_tag_entry: Added full test coverage.
- bytes are now stringified to a hex-byte representation.
2018-05-04 18:34:01 -04:00
Dustin Oprea d265631db3 ci: Fixed badge. 2018-05-04 11:05:35 -04:00
Dustin Oprea b46d138022 utility: Added tests. 2018-05-04 05:09:27 -04:00
Dustin Oprea a9c16ec9ef utility: Added tests. 2018-05-03 12:59:12 -04:00
Dustin Oprea c408aa04d0 ci: Added support for 1.6. Dropped support for unsupported 1.10 . 2018-05-03 12:45:18 -04:00
Dustin Oprea 21ce2d887e ci: Added support for more Go versions. 2018-05-03 12:43:15 -04:00
Dustin Oprea 75b2c75c5a ifd_builder_encode: Added tests for encoding child IBs to EXIF.
- Big step. This is the most complicated thing we can do.
- ifd_builder_encode: Need to debug encoding linked IFDs to EXIF.
- ifd_builder: Renamed `SetNextIfd()` to `SetNextIb()`.
- ifd_builder: Bugfix to size assertion on return of
  (IfdBuilderEncode).encodeIfdToBytes().
- ifd_enumerate: Rename PrintNode() to PrintTree().
- ifd_enumerate: Added DumpTree() (to return a list of strings).
2018-05-03 12:43:06 -04:00
Dustin Oprea b75f980bc4 ifd_enumerate: Create II when `Ifd` is constructed.
- ..rather than on-the-fly. Now efficient, especially now that it's used
  for find operations.
2018-05-03 11:13:34 -04:00
Dustin Oprea 8c09d04212 ifd_enumerate: Added find-by-id and find-by-name to tags in `ifd`.
- Made `(Ifd).Entries` a slice of pointers ([]*IfdTagEntry).
2018-05-03 04:09:06 -04:00
Dustin Oprea 84fe4298c4 documentation: Corrected go-get for tests. 2018-05-02 15:23:55 -04:00
Dustin Oprea 4d0cad2afb ci: Now print test names. 2018-05-02 15:22:12 -04:00
Dustin Oprea 7518b0882a exif: Bugfix to message in test.
- Put Travis badges in documentation.
2018-05-02 15:14:21 -04:00
Dustin Oprea 64e84ab28e ci: Added Travis config. 2018-05-02 13:53:42 -04:00
Dustin Oprea 51fdf33590 exif-read-tool: Added JSON support. 2018-05-02 13:11:23 -04:00
Dustin Oprea 35ddc4f803 ifd_builder_encode: Fixed tests from previous change.
- Simplified `builderTag` use.
2018-05-02 07:04:47 -04:00
Dustin Oprea 16586eb8cb ifd_builder: Now embed type in `builderTag`.
- We were automatically looking this up but this will prevent users from
  having a mechanism to use custom tags.
2018-05-02 06:40:36 -04:00
Dustin Oprea b748843a75 tags_unknown: Seeded a first test for encode/decode.
- type_encode: `EncodeWithType` can now encode TypeAsciiNoNul.
- Resolved/removed a bunch of to-do's.
2018-05-02 06:04:14 -04:00
Dustin Oprea cebf021131 exif-read-tool: Added unit-test and minimum documentation. 2018-05-02 04:11:46 -04:00
Dustin Oprea f4cb06d79d type: Renamed ValueString() to ResolveAsString(). 2018-05-02 02:21:06 -04:00
Dustin Oprea 54e4cb73eb IfdBuilder: Added AddFromConfigWithName().
- IfdBuilder: Added NewBuilderTagFromConfigWithName().
- TagIndex: Added GetWithName().
- IfdByteEncoder: Updated example to use names.
2018-05-01 12:22:48 -04:00
Dustin Oprea b78ca39e2b Added package description. 2018-05-01 11:04:55 -04:00
Dustin Oprea 88cb7331cf documentation: Added examples.
- Renamed DefaultEncodeByteOrder to EncodeDefaultByteOrder.
2018-05-01 10:57:55 -04:00
Dustin Oprea e8c30b7811 Tweaked write to-dos. 2018-05-01 10:20:39 -04:00
Dustin Oprea 98620a7d84 exif: Added function descriptions. 2018-05-01 10:18:52 -04:00
Dustin Oprea 2fca65a8ea ifd_builder_encoder: Added method to package full EXIF.
- Moved the EXIF-parsing being done in the tests to reusable code.
2018-05-01 03:29:42 -04:00
Dustin Oprea 9c721a573d ifd_builder_encode: Added test for recursive IB encoder.
- Constructs full structured EXIF on-disk structure.
- Bugfix: EncodeToBytes() started from an incorrect, initial offset.
2018-05-01 03:07:33 -04:00
Dustin Oprea 3a20f12306 encodeAndAttachIfd: Corrected IFD chain allocation arithmetic. 2018-04-30 03:30:34 -04:00
Dustin Oprea fe20d2c334 ifd_buider_encode: Fixed test.
- Because of addressing bugfix.
2018-04-30 02:40:41 -04:00
Dustin Oprea c83ebaf2a7 ifd_builder_encode: Added test to build and parse an EXIF.
- A big milestone. This is the same parsing that already works with
  EXIFs from production JPEGs.
2018-04-30 02:34:24 -04:00
Dustin Oprea 6ffca34f8e ifd_tag_entry: Implemented Value() and ValueString() wrappers.
- type: Added `(TagType).Resolve()` to return the parsed, typed value.
2018-04-30 02:32:08 -04:00
Dustin Oprea 89cfa38cfc exif: Reorganized. No-op changes. 2018-04-30 01:33:13 -04:00
Dustin Oprea db33894cde unknown: Moved UnknownValue() to type.go . 2018-04-30 01:32:09 -04:00
Dustin Oprea 81079a77d6 exif: Added EXIF header builder and unit-test. 2018-04-29 02:48:52 -04:00
Dustin Oprea bbc7f976af ifd_builder: Added test for encoding a complete IFD. 2018-04-29 01:51:12 -04:00
Dustin Oprea 4d0cfdc1d4 ifd_builder_encode: Added test for value allocation. 2018-04-29 00:41:07 -04:00
Dustin Oprea 9e8b57992d ifb_builder_encode: Tweaked comments and naming in test. 2018-04-28 22:39:05 -04:00
Dustin Oprea 18d527eb72 ifd_builder_encode: Added tests for child-IFD encoding and allocation.
- ifd_enumerate: Added utility functions to parse individual, encoded
  IFDs and tags.
- ifd_builder: Corrected `NewBuilderTagFromConfig()` to automatically
  encode whichever type of value-argument it gets.
2018-04-28 19:22:13 -04:00
Dustin Oprea 9db558a82d ifd_enumerate: Moved tag-parsing to separate method. 2018-04-28 13:08:15 -04:00
Dustin Oprea d06a3c8963 ifd_builder: Implemented NewBuilderTagFromConfig() BT factory for testing.
- Updated IfdByteEncoder tests to use it instead of hacking-together
  their own BT's (makes for more standardized, consistent testing).

- Universally refactored all core IFD knowledge implemented upon a
  single IFD name to instead work with IfdIdentity instances, instead,
  in order to validate that we only recognize the IFDs only in the
  context of the correct parents in the hierarchy.

- Implemented standard testing byte-order (assigned to
  TestDefaultByteOrder).
2018-04-27 03:42:59 -04:00
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 395c67bd57 ifd_builder: Tweaked TO-DOs. 2018-04-25 11:56:51 -04:00
Dustin Oprea 383780b3d8 ifd_builder_encode: Began writing tests. Began with encodeTagToBytes. More tests to go. 2018-04-25 11:51:08 -04:00