Commit Graph

128 Commits (1abace139c86f26fba392910a92d31be3b556549)

Author SHA1 Message Date
Dustin Oprea 1abace139c type: Fix for ASCII value encodings having an extra NUL.
- Fixed some error messages for accuracy.
2018-06-13 00:48:30 -04:00
Dustin Oprea 186facf99e ifd_builder: Fix for error from SetStandard functions not adding new tags. 2018-06-11 04:42:54 -04:00
Dustin Oprea 7e10e5db27 ifd_builder: Added ChildWithIfdIdentity().
- Adjusted some of the tag replacement functionality.
2018-06-10 18:45:38 -04:00
Dustin Oprea f998692895 type: Fixed FromString encoding for ASCII.
- We were appending a newline rather than NUL.
2018-06-10 18:45:34 -04:00
Dustin Oprea d79470a4f4 type: Now support marshaling from string to all types. 2018-06-10 03:25:44 -04:00
Dustin Oprea 9b70a9180c ifd_enumerate: Added FindIfdFromRootIfd(). 2018-06-10 00:13:00 -04:00
Dustin Oprea 80bab4b221 ci: master is now tested first. 2018-06-09 11:31:46 -04:00
Dustin Oprea 7f19a65f70 gps: Bugfix: GpsInfo method receivers now references. 2018-06-09 11:29:16 -04:00
Dustin Oprea 57f66ab0db ifd_enumerate: Renamed GPS image. 2018-06-09 03:20:17 -04:00
Dustin Oprea b9537b58c2 ifd_enumerate: Now parse the GPS info.
- Moved some IFD functionality out to its own file.
- Tweaked the permissions on some assets.
2018-06-09 02:11:24 -04:00
Dustin Oprea 1ce5b771db ifd_enumerate: Can now elect to not resolve tag value.
- To support testing.
2018-06-08 00:41:28 -04:00
Dustin Oprea 4c3a9d79f1 ifd_enumerate: Properly handle unknown-type tags during the initial parse. 2018-06-07 23:18:36 -04:00
Dustin Oprea cda05ba702 ifd_enumerate: Now extract and store value bytes immediately. 2018-06-07 22:51:40 -04:00
Dustin Oprea 4cd9e35801 ifd_enumerate: Implemented (*Ifd).ChildWithName() .
- Corrected some tabs that weren't correctly changed to spaces.
2018-06-07 21:36:14 -04:00
Dustin Oprea f4db9f31af tags: We now use a singleton TagIndex internally.
- We now embed the tags data so that we can be used in single,
  distributable binaries..
2018-06-07 05:15:51 -04:00
Dustin Oprea 1c95c159fb ifd_builder: Renamed "FromConfig" functions.
- ..to use the word "Standard" instead, instead of having both.
- Removed original NewStandardBuilderTag function. Just used by a couple
  of tests and it conflicts with one of the renamings.
2018-06-06 19:00:53 -04:00
Dustin Oprea 92f24ca51b header: Fixed-bytes now determined by byte-order. 2018-06-06 06:53:54 -04:00
Dustin Oprea 2eb57331ff exif: Dropped requirement for incorrect/non-standard EXIF prefix. 2018-06-06 05:32:14 -04:00
Dustin Oprea d05c9b4c81 ifd_tag_entry: Decoupled test from header semantics. 2018-06-06 05:26:13 -04:00
Dustin Oprea 4c58c1c84b exif: Eliminated an offset constant. Just used for tests.
- Will simplify fixing the header issues we have. It's relative, any way
  (won't be affected by the imminent changes to the header).
2018-06-06 05:17:56 -04:00
Dustin Oprea 1d7239382b testing: Moved common testing code to test_common.
- Tweaked comments to be more concise.
2018-06-06 05:11:07 -04:00
Dustin Oprea f1b0dd3a32 exif: Streamlined header-builder.
- The ParseExifHeader() function is now completely responsible for
  header decomposition and offset information.
2018-06-06 04:56:18 -04:00
Dustin Oprea 7745cfe74c exif: Deimplemented IsExif().
- exif
  - Began deconstructing Exif type in favor of just defining those
    methods as functions.
  - Added additional tests.
2018-06-06 04:37:43 -04:00
Dustin Oprea 7fa077bb78 exif: Added test for ParseExifHeader.
- Tweaked the test names for correctness.
2018-06-06 03:52:26 -04:00
Dustin Oprea 32664e6098 exif: Streamlined EXIF header parse. Made to behave like IsExif().
- We're prepping to deimplement IsExif() because it's just a lame
  duplication of ParseExifHeader().
  - Transitional step to being able to fix incorrect-header problem.
2018-06-06 03:42:18 -04:00
Dustin Oprea 570c4d582c ifd_builder: renamed builderTag to BuilderTag.
- It's probably a generally good idea.
  - These are usually created by other methods, but they're regularly
    interacted with when you want to make tag changes and by making them
    private we can't public official, testable examples.

- Corrected names for new examples.
2018-05-29 14:47:30 -04:00
Dustin Oprea 81b804b70d documentation: Added GoDoc badge. 2018-05-29 14:30:19 -04:00
Dustin Oprea b7368b1fb4 ifd_enumerate: Implemented ChildWithIfdIdentity. 2018-05-29 03:45:09 -04:00
Dustin Oprea dc6bb3e4b1 ifd_builder: Fixed test. 2018-05-29 02:15:18 -04:00
Dustin Oprea 6a9c7f28b1 ifd_builder: Added test for tag update.
- Added get-thumbnail and update-tag examples.
2018-05-29 02:09:01 -04:00
Dustin Oprea abbf7e0d92 ifd_builder: `builderTag` is now passed by reference. 2018-05-29 01:32:09 -04:00
Dustin Oprea 0a561e98ed Fixed tests for recent changes. 2018-05-29 00:55:43 -04:00
Dustin Oprea 8ce7625fc9 ifd_builder_encode: Fixed addressing.
- Corrects the resolution issue that we were experiencing in sibling
  IFDs.
2018-05-28 23:47:47 -04:00
Dustin Oprea 080ff7d07d Adjusted some string representations. Fixed some hex-encodings.
- unknown: We no longer truncate UNDEFINED UserComment values.
  - This is one less thing that will be different between what we read
    and how we encode.
2018-05-28 21:14:15 -04:00
Dustin Oprea 3c1c668a9f encode: We now encode child IFDs as they occur.
- ..rather than after the normal tags.
2018-05-28 20:04:02 -04:00
Dustin Oprea 5996e32e27 type_encode: Added to-do. 2018-05-25 21:12:45 -04:00
Dustin Oprea 75ff008365 thumbnails: Reimplemented to use normal decode flow.
- We added a trick to overcome the fact that the tag is a slice of longs
  rather than bytes (and would usually cause check errors and alignment
  problems), but this allows us to use the normal allocation and
  decoding flows that are used by normal tags.
  - Made things simpler, but we're still mis-encoding the
    thumbnail, somehow/somewhere.
2018-05-25 21:12:24 -04:00
Dustin Oprea c93f37a85d ifd_enumerate: Now parse and expose thumbnail. 2018-05-24 15:27:45 -04:00
Dustin Oprea d7ff9ccbbe Tag dumps now include indices. 2018-05-24 03:19:46 -04:00
Dustin Oprea 843976865e ifdBuilder.dumpToStrings: Fixed usage of II.
- We were ambiguously treating it as both the parent II in some places
  and the child II in others. It's supposed to be the parent II.
2018-05-24 01:58:58 -04:00
Dustin Oprea e3c96766ca tests: Fixed tests for recent changes. One remaining. 2018-05-22 09:39:03 -04:00
Dustin Oprea 3cee9b956b ifd_builder_encoder: Fixed subtle but detrimental bugs.
- ifd_builder_encode
  - Bugfix: We were assigning the "next" IFD in correctly (so, chaining
    was broken).
  - Bugfix: We weren't using the right value when *writing* the "next"
    IFD offset (so, chaining was, again, broken).
    - The same IFD was showing as both a child and a sibling, so we were
      seeing the EXIF IFD also being chained-to by the first root IFD
      instead of the *actual* sibling, but only after encoding and then
      decoding (so, this had to be tracked down in the encoding
      semantics, which was non-trivial).

  - Added a test for the stuff that we fixed.
  - Implemented journaling, where we can dump a hierarchically-formatted
    list of operations involved in a completed encode.

- ifd_enumerate: Added (Ifd).TagValueBytes() to return the raw tag-
  value's bytes (rather than just having (Ifd).TagValue(), which returns
  the value marshaled into a string). Good for comparing raw encoded
  and decoded values without imposing interpretation (which gets us into
  trouble with unknown-type tags whose values are non-standard and
  undocumentedand, therefore, not actually parseable).

- Rewired a lot of print and dump functions.
  - For naming-specificity as well as functionality.

- Removed from debugging.
2018-05-21 13:14:42 -04:00
Dustin Oprea 6207bd6200 Checkpoint. 2018-05-12 23:12:53 -04:00
Dustin Oprea cf17cf4aa6 ifd: Can now resolve its own tags' values.
- Adjustments to argument naming.
2018-05-06 16:19:20 -04:00
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