Commit Graph

131 Commits (d21ac8e2de85274733c163a2e1f62d8bb239c31d)

Author SHA1 Message Date
Dustin Oprea 46b1a0cd17 ifd_enumerate.go: Add date normalization. Skip altitude if zero denominator.
Fixes #43
2020-07-17 02:39:59 -04:00
Dustin Oprea 4e059a6b95 Drop inline RELEASE TO-DOs from v2. They are now active tasks in v3. 2020-07-11 12:12:48 -04:00
Dustin Oprea 17a2176005 v2/v3: Bump go-logging version to latest 2020-07-11 12:12:48 -04:00
Dustin Oprea e0ce96b49e Revert "Revert "ifd_enumerate.go: Eliminate unnecessary buffering""
This reverts commit 3bd3dd677b.

Includes fixes.
2020-07-09 22:01:27 -04:00
Dustin Oprea 3bd3dd677b Revert "ifd_enumerate.go: Eliminate unnecessary buffering"
This reverts commit 4692087c1a.

Broke unit-tests. Will unbreak shortly.
2020-07-09 16:19:38 -04:00
Dustin Oprea 4692087c1a ifd_enumerate.go: Eliminate unnecessary buffering
A simplification prior to some upcoming data-access changes.
2020-07-09 16:07:46 -04:00
Dustin Oprea 5a15f40e78 exif-read-tool/main.go: Tweak help message 2020-07-03 10:55:30 -04:00
Dustin Oprea bd6037a0b8 Bugfixes to previous report-card fixes 2020-06-12 02:13:50 -04:00
Dustin Oprea 9743a98845 Revert "Revert "Report-card fixes""
This reverts commit 4450f89e048a2373cd82a911725b6c54d22632eb.

The next commit has the fixes.
2020-06-12 02:13:36 -04:00
Dustin Oprea 591504aef0 Revert "Report-card fixes"
This reverts commit eb5bd13c98.

Introduced some new issues, here. This is being debugged on a separate
branch.

Fixes #41
2020-06-12 01:52:09 -04:00
Dustin Oprea eb5bd13c98 Report-card fixes 2020-06-10 16:11:13 -04:00
Dustin Oprea 7edf52b885 Timestamps can now be set directly 2020-06-07 01:33:12 -04:00
Dustin Oprea d69a43ee6a common/testing_common.go: Bugfix for empty module-path introduced by recent commit 2020-06-07 00:55:05 -04:00
Dustin Oprea e50deb910e main_test.go: Do not pre-cache values from init() in tests 2020-06-07 00:51:43 -04:00
Dustin Oprea ca8584a0e1 Minor sensible testing refactors 2020-06-04 15:34:36 -04:00
Dustin Oprea a350bacdac exif.go: Use constant symbol rather than literal 2020-06-04 01:37:20 -04:00
Dustin Oprea 7a76510c2b Revert "Refactor module-detection to use go/build instead of static file"
This reverts commit c23f7a1066.

The package-path will be a build-path rather than a source-path, and any
assets being referred to will not be found.
2020-06-04 01:37:15 -04:00
Dustin Oprea eb6d1c16a5 Revert "common/testing_common.go: Bugfix for package-path finder"
This reverts commit 77cb76cd34.

The package-path will be a build-path rather than a source-path, and any
assets being referred to will not be found.
2020-06-04 01:35:32 -04:00
Dustin Oprea 77cb76cd34 common/testing_common.go: Bugfix for package-path finder 2020-06-02 15:01:38 -04:00
Dustin Oprea c23f7a1066 Refactor module-detection to use go/build instead of static file 2020-06-02 04:23:08 -04:00
Dustin Oprea a06d9b9e40 ifd_tag_entry.go: Bugfix for GetRawBytes() mishandling error from exifundefined.Decode()
if `Decode()` returns `exifcommon.ErrUnhandledUndefinedTypedTag` it just
falls through, but should have been returning
`exifundefined.ErrUnparseableValue`.

- Also, `GetRawBytes()` was missing the recover clause for blanket error
  handler.
2020-05-31 11:14:09 -04:00
Dustin Oprea 1a62daf305 ifd.go: Moved implementations of IfdMapping and LoadStandardIfds to exifcommon.ifd
In lieu of dropping in next release. We needed this in order to write
some unit-tests for exifcommon functionality, and this is common
functionality anyway (by any definition of common thus far).

- common/ifd.go: Added NewIfdIdentityFromString. The above allowed us to
  cover this with unit-tests.
  - This was required for go-exif-knife, to get IFD-paths from the
    command-line.
2020-05-27 12:50:02 -04:00
Dustin Oprea 2a1e3f0fa1 ifd_enumerate.go: Add call to postparseTag() after parseTag() in ParseOneTag()
- Should have been in previous
2020-05-27 00:29:08 -04:00
Dustin Oprea fb98f429ee We now guess at alternative IFDs for invalid tags automatically
This required some backtracking on a change we just pushed a little
while ago.
2020-05-27 00:29:03 -04:00
Dustin Oprea b4c2ca5765 tags.go: Bugfix for bad FindFirst() error handling and not returning if not found
- utility.go: Add GetExifData() to return flat tags and extra data and
  to allow guessing of tags for misplaced IFDs.

- exif-read-tool/main.go: Implement tag guessing
2020-05-26 21:28:27 -04:00
Dustin Oprea df74da8384 tags_data.go: Drop non-standard tags having non-standard, undocumented types 2020-05-26 21:14:23 -04:00
Dustin Oprea de4b8921bd Log guesses about implementation incongruities for invalid tags
2020/05/25 19:21:33 exif.utility: [WARNING]  Tag with ID (0x0201) in IFD [IFD/Exif] is not recognized and will be ignored.
2020/05/25 19:21:33 exif.utility: [WARNING]  (cont'd) Tag [JPEGInterchangeFormat] with the same ID has been found in IFD [IFD] and may be related. The tag you were looking for might have been written to the wrong IFD by a buggy implementation.
2020/05/25 19:21:33 exif.utility: [WARNING]  Tag with ID (0x0202) in IFD [IFD/Exif] is not recognized and will be ignored.
2020/05/25 19:21:33 exif.utility: [WARNING]  (cont'd) Tag [JPEGInterchangeFormatLength] with the same ID has been found in IFD [IFD] and may be related. The tag you were looking for might have been written to the wrong IFD by a buggy implementation.

Closes #38
2020-05-25 19:22:47 -04:00
Dustin Oprea 75b5552112 tags.go: 'Get' functions now take an exifcommon.IfdIdentity 2020-05-24 11:07:46 -04:00
Dustin Oprea 1a12aec48f utility.go: Drop FqIfdPath. Now fully obsolete. 2020-05-20 15:12:04 -04:00
Dustin Oprea 015129a9ef Use RELEASE() notes to denote future backwards-incompatible TODOs 2020-05-20 14:33:28 -04:00
Dustin Oprea 957b817f85 ifd_enumerate.go: Tweak variable name 2020-05-20 14:31:49 -04:00
Dustin Oprea 08ac8466dd ifd.go: Add type system for IFD IDs, names, and paths
This allows us to pass around individual tokens that we can use to
generate IDs, names, and qualified and non-qualified IFD paths, rather
than [necessarily] having to pass or store them individually.

The previous global variables were strings. Now they are IfdIdentity structs
and have been renamed to be more accurate (in general, as well as for this).
The previous variables have been kept but are now just assigned to the newer
variables. This is backwards-compatibility that will be removed in the future.
2020-05-20 14:07:16 -04:00
Dustin Oprea 40de7cc624 ifd.go: Add missing comments 2020-05-20 14:04:00 -04:00
Dustin Oprea 1b9bb61b5f ifd_enumerate.go: Stop exporting `ParseIfd()` 2020-05-19 03:41:06 -04:00
Dustin Oprea 3cdb59fd80 exif-read-tool: Fix unit-tests and remove unnecessary conditional for 4686c99 2020-05-19 02:47:07 -04:00
Dustin Oprea 753e5191d6 utility.go: Reduce duplication in `GetFlatExifData()` and just use `Scan()` 2020-05-19 02:47:07 -04:00
Dustin Oprea 0f18278742 go.mod: Bugfix for accidental commit 2020-05-19 02:47:06 -04:00
Dustin Oprea 71d0c799d3 Bugfix for some tags failing encoding due to more than one supported type
This was a recently introduced, preexisting bug caused by adding support
for multiple types for certain tags. This suddenly became an issue when
we added all remaining additional types and at least one of these was in
our testing data.
2020-05-19 02:32:43 -04:00
Dustin Oprea 15666b6093 exif-read-tool/main_test.go: Fix usage from tests for go-flags change 2020-05-18 22:37:37 -04:00
Dustin Oprea 76635a8c89 utility.go: Bugfix for excessive loading and reloading of tag-indices 2020-05-18 01:23:35 -04:00
Dustin Oprea 4686c99e3c exif-read-tool/main.go: Just use GetFlatExifData() instead of our own visitor process 2020-05-18 01:16:27 -04:00
Dustin Oprea 8e727e3388 ifd_enumerate.go: We now log the approximate size of the EXIF blob 2020-05-18 01:15:29 -04:00
Dustin Oprea af2e8222eb utility.go: ExifTag now has UnitCount field 2020-05-18 01:14:56 -04:00
Dustin Oprea 7aa41d6d0d ifd_enumerate.go: Add missing comments 2020-05-18 00:50:10 -04:00
Dustin Oprea 6629fe3012 tags.go: Tweak tag-registration logging verbiage 2020-05-18 00:21:25 -04:00
Dustin Oprea 4857cb0b30 exif-read-tool/main.go: Can now suppress the tag output 2020-05-18 00:12:54 -04:00
Dustin Oprea e1d21a3716 exif-read-tool/main.go: Use go-flags for command-line processing 2020-05-18 00:09:14 -04:00
Dustin Oprea d0d0f14dea tags_data.go: FNumber and ExposureTime can now be decoded if SRATIONAL 2020-05-17 20:16:53 -04:00
Dustin Oprea 29b0ff2256 tags_data.go: Bugfix for some standard tags being ignored 2020-05-17 19:41:48 -04:00
Dustin Oprea d2495e29dd utility.go: Skip unknown tags in GetFlatExifData
This makes its behavior consistent with other iteration/enumeration
functions and also mitigates handling errors by unsuspecting callers.
2020-05-17 19:40:38 -04:00