Upgrade go-exif and go-jpeg-image-structure; see #302, #304, #305 and #295

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-05-18 08:44:40 +02:00
parent 46f3f12da8
commit 7121c09d66
4 changed files with 21 additions and 11 deletions

6
go.mod
View file

@ -11,9 +11,9 @@ require (
github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8 // indirect
github.com/disintegration/imaging v1.6.2
github.com/djherbis/times v1.2.0
github.com/dsoprea/go-exif/v2 v2.0.0-20200517080529-c9be4b30b064
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200516213931-1a2b5d83999c
github.com/dsoprea/go-png-image-structure v0.0.0-20200517082754-d30fc708b6a7
github.com/dsoprea/go-exif/v2 v2.0.0-20200518052335-76635a8c899c
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200518003458-bbcbe0381b9a
github.com/dsoprea/go-png-image-structure v0.0.0-20200518003737-91ceb687d379
github.com/dsoprea/go-utility v0.0.0-20200512094054-1abbbc781176 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/gin-gonic/gin v1.6.2

10
go.sum
View file

@ -75,6 +75,10 @@ github.com/dsoprea/go-exif/v2 v2.0.0-20200516122116-a45cc7cfd55e/go.mod h1:YXOyD
github.com/dsoprea/go-exif/v2 v2.0.0-20200516213102-7f6eb3d9f38c/go.mod h1:YXOyDqCYjBuHHRw4JIGPgOgMit0IDvVSjjhsqOAFTYQ=
github.com/dsoprea/go-exif/v2 v2.0.0-20200517080529-c9be4b30b064 h1:V7CH/kZImE6Lf27H4DS5PG7qzBkf774GIXUuM31vVNA=
github.com/dsoprea/go-exif/v2 v2.0.0-20200517080529-c9be4b30b064/go.mod h1:YXOyDqCYjBuHHRw4JIGPgOgMit0IDvVSjjhsqOAFTYQ=
github.com/dsoprea/go-exif/v2 v2.0.0-20200518001653-d0d0f14dea03 h1:r+aCxLEe6uGDC/NJCpA3WQJ+C7WJ0chzfHKgy173fug=
github.com/dsoprea/go-exif/v2 v2.0.0-20200518001653-d0d0f14dea03/go.mod h1:STKu28lNwOeoO0bieAKJ3zQYkUbZ2hivI6qjjGVW0sc=
github.com/dsoprea/go-exif/v2 v2.0.0-20200518052335-76635a8c899c h1:SVu4Dcw/C6jBeIqHdqYIank5VehK9PnxXRA+f0WeMAs=
github.com/dsoprea/go-exif/v2 v2.0.0-20200518052335-76635a8c899c/go.mod h1:TBGj4HIwwOcp7TMp41JhyVAsxqIQWtaRKkEzMDS2YEQ=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200419165912-75b7a4f392e6 h1:6oyE0L+MX1iUjldwrLdAaU95g36UrKpbmlyslhyoJj4=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200419165912-75b7a4f392e6/go.mod h1:5vwlfhyZI7u8AuvTl0G70sdqVdH41f7dscvBQ6mEbHs=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200504080818-288e72e0addf h1:fHaBuk2M/HNmLyQlQH91UNmsc883sNLukYXEsk7coZM=
@ -83,14 +87,20 @@ github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200516131022-2c0537684b05 h1
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200516131022-2c0537684b05/go.mod h1:7V7bSB5y4Zwomfq6jz43dABqCs9RFCgV+gakP7lIcHY=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200516213931-1a2b5d83999c h1:RZvJ7E+mORcF8XhOQSRZuC4E7nEgcFH204VUPR3gTfE=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200516213931-1a2b5d83999c/go.mod h1:U8BFV7LiBHYJ9dgX/JbN1WvfoViEarsmZcjgfaZkGlA=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200518003458-bbcbe0381b9a h1:E6i+A7eIL5/8toXBsKsUgCTuc8Rifb8Ep0StWJ0KHfo=
github.com/dsoprea/go-jpeg-image-structure v0.0.0-20200518003458-bbcbe0381b9a/go.mod h1:OV145ySXtZyJHbqgovHsfo4mpgqhASnbX3XhVIfki6w=
github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696 h1:VGFnZAcLwPpt1sHlAxml+pGLZz9A2s+K/s1YNhPC91Y=
github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA=
github.com/dsoprea/go-logging v0.0.0-20200502201358-170ff607885f h1:FonKAuW3PmNtqk9tOR+Z7bnyQHytmnZBCmm5z1PQMss=
github.com/dsoprea/go-logging v0.0.0-20200502201358-170ff607885f/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d h1:F/7L5wr/fP/SKeO5HuMlNEX9Ipyx2MbH2rV9G4zJRpk=
github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
github.com/dsoprea/go-png-image-structure v0.0.0-20200402000326-c0fdb803026f h1:cuf7rjLGedkB0V4UcWmWMxDZGKNtCM0dGt1WTWsZXDQ=
github.com/dsoprea/go-png-image-structure v0.0.0-20200402000326-c0fdb803026f/go.mod h1:wFgCouxC0gy+d+sre8HkLj+VeUWPr969zAOvQ9NGXJc=
github.com/dsoprea/go-png-image-structure v0.0.0-20200517082754-d30fc708b6a7 h1:lM7vCkpw45aYj9Ol9kkJKoMSOP/U0CrLCJScgx51Q3o=
github.com/dsoprea/go-png-image-structure v0.0.0-20200517082754-d30fc708b6a7/go.mod h1:fVUPRFoRw3iQ4VE+xir9UnY/oYffIgDHAa2rekKAmp8=
github.com/dsoprea/go-png-image-structure v0.0.0-20200518003737-91ceb687d379 h1:Jtq4T3s2Bv7IUhYJqOPywdEYTkc35JfB2jUOP+5Tvc4=
github.com/dsoprea/go-png-image-structure v0.0.0-20200518003737-91ceb687d379/go.mod h1:Tg1+KPxoNGpX2lVyapYmTNsX1VNVmlEeNqWNA0jwpsg=
github.com/dsoprea/go-utility v0.0.0-20200322154813-27f0b0d142d7 h1:DJhSHW0odJrW5wR9MU6ry5S+PsxuRXA165KFaiB+cZo=
github.com/dsoprea/go-utility v0.0.0-20200322154813-27f0b0d142d7/go.mod h1:xv8CVgDmI/Shx/X+EUXyXELVnH5lSRUYRija52OHq7E=
github.com/dsoprea/go-utility v0.0.0-20200412174200-5aee815e0920 h1:/sPqpPAmg/hrNrlW6EjFrKMQkiJ4888voMOG0uYHNec=

View file

@ -19,8 +19,8 @@ func TestExif(t *testing.T) {
assert.Equal(t, "2020-01-01T17:28:23Z", data.TakenAtLocal.Format("2006-01-02T15:04:05Z"))
assert.Equal(t, "Example file for development", data.Description)
assert.Equal(t, "This is a legal notice", data.Copyright)
assert.Equal(t, 540, data.Height)
assert.Equal(t, 720, data.Width)
assert.Equal(t, 2736, data.Height)
assert.Equal(t, 3648, data.Width)
assert.Equal(t, float32(52.45969), data.Lat)
assert.Equal(t, float32(13.321832), data.Lng)
assert.Equal(t, 0, data.Altitude)
@ -84,8 +84,8 @@ func TestExif(t *testing.T) {
assert.Equal(t, "", data.Keywords)
assert.Equal(t, "DCIM\\100GOPRO", data.Description)
assert.Equal(t, "", data.Copyright)
assert.Equal(t, 180, data.Height)
assert.Equal(t, 240, data.Width)
assert.Equal(t, 2880, data.Height)
assert.Equal(t, 3840, data.Width)
assert.Equal(t, float32(0), data.Lng)
assert.Equal(t, 0, data.Altitude)
assert.Equal(t, "1/2462", data.Exposure)

View file

@ -41,8 +41,8 @@ func TestMediaFile_Exif_JPEG(t *testing.T) {
assert.Equal(t, float32(-33.45347), info.Lat)
assert.Equal(t, float32(25.764645), info.Lng)
assert.Equal(t, 190, info.Altitude)
assert.Equal(t, 497, info.Width)
assert.Equal(t, 331, info.Height)
assert.Equal(t, 2048, info.Width)
assert.Equal(t, 1365, info.Height)
assert.Equal(t, false, info.Flash)
assert.Equal(t, "", info.Description)
t.Logf("UTC: %s", info.TakenAt.String())
@ -74,8 +74,8 @@ func TestMediaFile_Exif_JPEG(t *testing.T) {
assert.Equal(t, float32(10), info.FNumber)
assert.Equal(t, 200, info.Iso)
assert.Equal(t, 0, info.Altitude)
assert.Equal(t, 331, info.Width)
assert.Equal(t, 331, info.Height)
assert.Equal(t, 2048, info.Width)
assert.Equal(t, 2048, info.Height)
assert.Equal(t, true, info.Flash)
assert.Equal(t, "", info.Description)
t.Logf("UTC: %s", info.TakenAt.String())