Commit Graph

386 Commits (52fa399645caec8cafbe1429c043a6057a665750)

Author SHA1 Message Date
Dustin Oprea 52fa399645 tags_data.go: Add some missing, should-be-supported IFD/Exif tags 2021-01-31 17:15:54 -05:00
Dustin Oprea 3089244e86 tags_data.go: Trim whitespace 2021-01-31 17:15:54 -05:00
Dustin Oprea 0d9ceeb35b exif.go: Add support for seeking to multiple EXIF blobs (SearchAndExtractExifN)
- ifd_enumerate.go
  - Bugfixes for various broken log messages.
  - Bugfix for ErrTagNotFound not actually skipping.

- common/parser.go: Parsing ASCII now panics if there's binary (8-bit)
  characters.
  - utility.go: GetFlatExifData() just logs and skips these.

- exif.go: Add searchAndExtractExifWithReaderWithDiscarded(), to return
  how many bytes it seeks through.

Supports https://github.com/dsoprea/go-exif/issues/53
2021-01-31 17:15:48 -05:00
Dustin Oprea db167117f4 Add GeoTIFF reference 2020-12-16 17:25:38 -05:00
Wendel Hime 4382f1769b tags_data.go: add GeoTIFF support 2020-12-16 17:24:38 -05:00
Dustin Oprea 12dc66d902 Add GeoTIFF sample file
From https://www.sciencebase.gov/catalog/item/53f5a87ae4b09d12e0e8547b

Related to #52
2020-12-15 01:22:05 -05:00
Dustin Oprea 64f5c6ad03 value_context.go: Bugfix for missing float and double cases in Values()
Related to 325de3c
2020-12-15 01:18:58 -05:00
Dustin Oprea fe4ea0ee06 value_encoder_test.go: Tweak test name for correctness 2020-12-09 01:44:58 -05:00
Wendel Hime 325de3c5bb
adding float and double as types with name and size tests (#51)
add translate to type cases

replace float compare by Nextafter and Nextafter32

add parser for floats and doubles

add float and double parsers

add support for doubles and floats in FormatFrom functions

add ReadFloats and ReadDoubles for context

add float32 and double encoder

merging

merge

add float and double parsers

add ReadFloats and ReadDoubles for context

add float32 and double encoder

removing log alias from parser

removing log alias from parser_test

removing log alias from type

removing log alias from type_test

removing log alias from value_context

removing aliases from value_contex_test

removing log alias from value_encoder

removing log alias from value_encoder_test

update parser slices from floats and doubles

merge

update values for tests

raise exception when parsing with different expected size
2020-12-09 01:40:27 -05:00
Dustin Oprea b3f4f3b4b7 tags.go: Serialized adds/gets on index
https://github.com/photoprism/photoprism/issues/600
2020-11-22 01:46:30 -05:00
Dustin Oprea de21411905 common/type.go: No longer format text verbatim if has binary 2020-08-26 18:56:25 -04:00
Dustin Oprea 089aa48c91 ifd_enumerate.go: Bugfix for not skipping unknown tags 2020-08-07 03:52:13 -04:00
Dustin Oprea 74a1612f20 v3/ifd_enumerate: Skip tags that have a divergent embedded type
This should mitigate most issues where the same tag appears multiple
times with different types. This happens more than you would think that
it would.

- ErrTagTypeNotValid is now returned unwrapped.
  - This is typically the convention for static error messages.

https://github.com/photoprism/photoprism/issues/431
2020-07-31 04:03:32 -04:00
Dustin Oprea 33ee3a8313 ifd_enumerate.go: Do not allow unnecessary thumbnail read to disrupt enumeration 2020-07-21 23:35:36 -04:00
Dustin Oprea 3a80916d1f README.md: Update badges 2020-07-21 01:16:11 -04:00
Dustin Oprea 9393e7afd4 Upgrade from go-utility v1 to v2 2020-07-17 03:10:58 -04:00
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 08f1b67089 Allow compatibility with Go 1.12
- We don't require 1.13 .
2020-07-17 01:34:12 -04:00
Dustin Oprea 796ddda06f Revert ".travis.yml: Add Go 1.11 to CI"
This reverts commit 73fc50e0d0.

No good. Dependencies require 1.11 .
2020-07-17 00:58:16 -04:00
Dustin Oprea 4675ba7529 ifd_enumerate.go: Add NextIfd() accessor
- Supports go-exif-knife.
2020-07-17 00:54:38 -04:00
Dustin Oprea 73fc50e0d0 .travis.yml: Add Go 1.11 to CI 2020-07-17 00:54:17 -04:00
Dustin Oprea f93c06e0d6 v3: Fix import naming glitch 2020-07-16 21:33:45 -04:00
Dustin Oprea 0758712be3 README.md: Update badge for codecov.io 2020-07-11 14:20:15 -04:00
Dustin Oprea 208788de28 go.mod: Drop go-utility replacement and update sums 2020-07-11 14:06:20 -04:00
Dustin Oprea 32eff3cfee .travis.yml: Switch to codecov.io 2020-07-11 13:47:13 -04:00
Dustin Oprea 9e26737f70 .travis.yml: Fix CI for v2 2020-07-11 13:39:08 -04:00
Dustin Oprea 3ee774b832 README.md: Update for v3 2020-07-11 13:37:28 -04:00
Dustin Oprea d19e38a723 backwards incompatible: ifd_enumerate.go: Drop fqIfdPath and ifdIndex from visitor function signature 2020-07-11 13:15:18 -04:00
Dustin Oprea f2c3d1c0ec backwards incompatible: ifd_enumerate.go: Stop exporting Ifd fields
Finally.
2020-07-11 13:15:18 -04:00
Dustin Oprea dcd29a9733 backwards incompatible: Move exif-read-tool to command/
Per standard practice.
2020-07-11 13:15:18 -04:00
Dustin Oprea 7ca1c7b13e backwards incompatible: GetFlatExifData(), Scan(), and Visit() all take a ScanOptions struct now 2020-07-11 13:15:18 -04:00
Dustin Oprea 3f7ee4ce89 backwards incompatible: Move time utilities to exifcommon 2020-07-11 13:15:18 -04:00
Dustin Oprea 83b844408c backwards incompatible: Stop exporting ParseOneIfd and ParseOneTag 2020-07-11 13:15:18 -04:00
Dustin Oprea ee26db1fc4 backwards incompatible: Drop redundant variables 2020-07-11 13:15:18 -04:00
Dustin Oprea 7d4721b065 backwards incompatible: Removed bridging functions
NewIfdMappingWithStandard and related (in ifd.go). We now use the same
functions in common/.

- NewIfdMappingWithStandard now returns an error, too.

This took care of several backwards-incompatible tasks that have been
waiting on v3 to be forked.
2020-07-11 13:15:12 -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 f76918441c .travis.yml: Add CI for v3 2020-07-11 12:12:48 -04:00
Dustin Oprea 312218d7b1 Use encapsulated data/reader rather than bytes
Given a stream of data, it is possible to determine the beginning of
EXIF data but not the end. Therefore, either an image-aware
implementation must know how to parse an image and extract the EXIF
data or a brute-force search implementation (one of which is provided
by this project) must find the start anchor and then return all bytes
from that to the end of the file.

We have been made aware of some use-cases where a brute-force search
might be unavoidable due to trust or stability issues with the image
structure. This leads to large allocations. This can be avoided by
accomodating support that will allow for both a byte-slice or an
`io.ReadSeeker`. Since the EXIF structure is typically not read-
intensive (a couple of kilobytes if no thumbnail is present), this
should have a minimal performance impact.

Closes #42
2020-07-11 12:12:48 -04:00
Dustin Oprea 56058635d0 Seed v3 release. Copy from v2 release. 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 1b5ecc84b1 README.md: Tweak contribution verbiage 2020-06-12 02:38:33 -04:00
Dustin Oprea bd92d354b0 Minor report-card fixes in v1 2020-06-12 02:22:22 -04:00
Dustin Oprea 4e9bef94e7 .travis.yml: Add builds for 1.14 2020-06-12 02:13:50 -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