mirror of https://github.com/dsoprea/go-exif.git
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.dustin/master
parent
4e059a6b95
commit
7d4721b065
|
@ -59,11 +59,10 @@ func NewIfdMapping() (ifdMapping *IfdMapping) {
|
||||||
|
|
||||||
// NewIfdMappingWithStandard retruns a new IfdMapping struct preloaded with the
|
// NewIfdMappingWithStandard retruns a new IfdMapping struct preloaded with the
|
||||||
// standard IFDs.
|
// standard IFDs.
|
||||||
func NewIfdMappingWithStandard() (ifdMapping *IfdMapping) {
|
func NewIfdMappingWithStandard() (ifdMapping *IfdMapping, err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err = log.Wrap(state.(error))
|
||||||
log.Panic(err)
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -71,10 +70,10 @@ func NewIfdMappingWithStandard() (ifdMapping *IfdMapping) {
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im := NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
err = LoadStandardIfds(im)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
return im
|
return im, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get returns the node given the path slice.
|
// Get returns the node given the path slice.
|
||||||
|
|
|
@ -230,10 +230,12 @@ func TestIfdMapping_PathPhraseFromLineage(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdMapping_NewIfdMappingWithStandard(t *testing.T) {
|
func TestIfdMapping_NewIfdMappingWithStandard(t *testing.T) {
|
||||||
imWith := NewIfdMappingWithStandard()
|
imWith, err := NewIfdMappingWithStandard()
|
||||||
|
log.PanicIf(err)
|
||||||
|
|
||||||
imWithout := NewIfdMapping()
|
imWithout := NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(imWithout)
|
err = LoadStandardIfds(imWithout)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
outputWith, err := imWith.DumpLineages()
|
outputWith, err := imWith.DumpLineages()
|
||||||
|
|
|
@ -113,7 +113,9 @@ func main() {
|
||||||
|
|
||||||
thumbnailOutputFilepath := arguments.ThumbnailOutputFilepath
|
thumbnailOutputFilepath := arguments.ThumbnailOutputFilepath
|
||||||
if thumbnailOutputFilepath != "" {
|
if thumbnailOutputFilepath != "" {
|
||||||
im := exif.NewIfdMappingWithStandard()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := exif.NewTagIndex()
|
ti := exif.NewTagIndex()
|
||||||
|
|
||||||
_, index, err := exif.Collect(im, ti, rawExif)
|
_, index, err := exif.Collect(im, ti, rawExif)
|
||||||
|
|
|
@ -61,7 +61,8 @@ func TestVisit(t *testing.T) {
|
||||||
|
|
||||||
// Run the parse.
|
// Run the parse.
|
||||||
|
|
||||||
im := NewIfdMappingWithStandard()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
log.PanicIf(err)
|
||||||
|
|
||||||
tags := make([]string, 0)
|
tags := make([]string, 0)
|
||||||
|
|
||||||
|
@ -253,9 +254,7 @@ func TestCollect(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
40
v3/ifd.go
40
v3/ifd.go
|
@ -1,40 +0,0 @@
|
||||||
package exif
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/dsoprea/go-logging"
|
|
||||||
|
|
||||||
"github.com/dsoprea/go-exif/v2/common"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TODO(dustin): This file now exists for backwards-compatibility only.
|
|
||||||
|
|
||||||
// NewIfdMapping returns a new IfdMapping struct.
|
|
||||||
//
|
|
||||||
// RELEASE(dustin): This is a bridging function for backwards-compatibility. Remove this in the next release.
|
|
||||||
func NewIfdMapping() (ifdMapping *exifcommon.IfdMapping) {
|
|
||||||
return exifcommon.NewIfdMapping()
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewIfdMappingWithStandard retruns a new IfdMapping struct preloaded with the
|
|
||||||
// standard IFDs.
|
|
||||||
//
|
|
||||||
// RELEASE(dustin): This is a bridging function for backwards-compatibility. Remove this in the next release.
|
|
||||||
func NewIfdMappingWithStandard() (ifdMapping *exifcommon.IfdMapping) {
|
|
||||||
return exifcommon.NewIfdMappingWithStandard()
|
|
||||||
}
|
|
||||||
|
|
||||||
// LoadStandardIfds loads the standard IFDs into the mapping.
|
|
||||||
//
|
|
||||||
// RELEASE(dustin): This is a bridging function for backwards-compatibility. Remove this in the next release.
|
|
||||||
func LoadStandardIfds(im *exifcommon.IfdMapping) (err error) {
|
|
||||||
defer func() {
|
|
||||||
if state := recover(); state != nil {
|
|
||||||
err = log.Wrap(state.(error))
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
err = exifcommon.LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -183,16 +183,14 @@ func Test_IfdByteEncoder_encodeTagToBytes_bytes_embedded1(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
ibe := NewIfdByteEncoder()
|
ibe := NewIfdByteEncoder()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -224,9 +222,7 @@ func Test_IfdByteEncoder_encodeTagToBytes_bytes_embedded1(t *testing.T) {
|
||||||
func Test_IfdByteEncoder_encodeTagToBytes_bytes_embedded2(t *testing.T) {
|
func Test_IfdByteEncoder_encodeTagToBytes_bytes_embedded2(t *testing.T) {
|
||||||
ibe := NewIfdByteEncoder()
|
ibe := NewIfdByteEncoder()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -258,9 +254,7 @@ func Test_IfdByteEncoder_encodeTagToBytes_bytes_embedded2(t *testing.T) {
|
||||||
func Test_IfdByteEncoder_encodeTagToBytes_bytes_allocated(t *testing.T) {
|
func Test_IfdByteEncoder_encodeTagToBytes_bytes_allocated(t *testing.T) {
|
||||||
ibe := NewIfdByteEncoder()
|
ibe := NewIfdByteEncoder()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -317,9 +311,7 @@ func Test_IfdByteEncoder_encodeTagToBytes_bytes_allocated(t *testing.T) {
|
||||||
func Test_IfdByteEncoder_encodeTagToBytes_childIfd__withoutAllocate(t *testing.T) {
|
func Test_IfdByteEncoder_encodeTagToBytes_childIfd__withoutAllocate(t *testing.T) {
|
||||||
ibe := NewIfdByteEncoder()
|
ibe := NewIfdByteEncoder()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -352,8 +344,8 @@ func Test_IfdByteEncoder_encodeTagToBytes_childIfd__withAllocate(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -361,9 +353,7 @@ func Test_IfdByteEncoder_encodeTagToBytes_childIfd__withAllocate(t *testing.T) {
|
||||||
// space for and then attach to a tag (which would normally be an entry,
|
// space for and then attach to a tag (which would normally be an entry,
|
||||||
// then, in a higher IFD).
|
// then, in a higher IFD).
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -473,8 +463,8 @@ func Test_IfdByteEncoder_encodeTagToBytes_simpleTag_allocate(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -485,9 +475,7 @@ func Test_IfdByteEncoder_encodeTagToBytes_simpleTag_allocate(t *testing.T) {
|
||||||
|
|
||||||
ibe := NewIfdByteEncoder()
|
ibe := NewIfdByteEncoder()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -617,8 +605,8 @@ func Test_IfdByteEncoder_encodeIfdToBytes_fullExif(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -667,8 +655,8 @@ func Test_IfdByteEncoder_EncodeToExifPayload(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -718,14 +706,12 @@ func Test_IfdByteEncoder_EncodeToExif_WithChildAndSibling(t *testing.T) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
err := log.Wrap(state.(error))
|
err := log.Wrap(state.(error))
|
||||||
log.PrintErrorf(err, "Test failure.")
|
log.PrintError(err)
|
||||||
panic(err)
|
t.Fatalf("Test failed.")
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -838,9 +824,7 @@ func Test_IfdByteEncoder_EncodeToExif_WithChildAndSibling(t *testing.T) {
|
||||||
func ExampleIfdByteEncoder_EncodeToExif() {
|
func ExampleIfdByteEncoder_EncodeToExif() {
|
||||||
// Construct an IFD.
|
// Construct an IFD.
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
|
@ -15,9 +15,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIfdBuilder_Add(t *testing.T) {
|
func TestIfdBuilder_Add(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -107,9 +105,7 @@ func TestIfdBuilder_Add(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_SetNextIb(t *testing.T) {
|
func TestIfdBuilder_SetNextIb(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -132,9 +128,7 @@ func TestIfdBuilder_SetNextIb(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_AddChildIb(t *testing.T) {
|
func TestIfdBuilder_AddChildIb(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -187,9 +181,7 @@ func TestIfdBuilder_AddTagsFromExisting(t *testing.T) {
|
||||||
|
|
||||||
exifData := getExifSimpleTestIbBytes()
|
exifData := getExifSimpleTestIbBytes()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -223,9 +215,7 @@ func TestIfdBuilder_AddTagsFromExisting(t *testing.T) {
|
||||||
func TestIfdBuilder_AddTagsFromExisting__Includes(t *testing.T) {
|
func TestIfdBuilder_AddTagsFromExisting__Includes(t *testing.T) {
|
||||||
exifData := getExifSimpleTestIbBytes()
|
exifData := getExifSimpleTestIbBytes()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -256,9 +246,7 @@ func TestIfdBuilder_AddTagsFromExisting__Includes(t *testing.T) {
|
||||||
func TestIfdBuilder_AddTagsFromExisting__Excludes(t *testing.T) {
|
func TestIfdBuilder_AddTagsFromExisting__Excludes(t *testing.T) {
|
||||||
exifData := getExifSimpleTestIbBytes()
|
exifData := getExifSimpleTestIbBytes()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -289,9 +277,7 @@ func TestIfdBuilder_AddTagsFromExisting__Excludes(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__First_1(t *testing.T) {
|
func TestIfdBuilder_FindN__First_1(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -345,9 +331,7 @@ func TestIfdBuilder_FindN__First_1(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__First_2_1Returned(t *testing.T) {
|
func TestIfdBuilder_FindN__First_2_1Returned(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -401,9 +385,7 @@ func TestIfdBuilder_FindN__First_2_1Returned(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__First_2_2Returned(t *testing.T) {
|
func TestIfdBuilder_FindN__First_2_2Returned(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -484,9 +466,7 @@ func TestIfdBuilder_FindN__First_2_2Returned(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__Middle_WithDuplicates(t *testing.T) {
|
func TestIfdBuilder_FindN__Middle_WithDuplicates(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -570,9 +550,7 @@ func TestIfdBuilder_FindN__Middle_WithDuplicates(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__Middle_NoDuplicates(t *testing.T) {
|
func TestIfdBuilder_FindN__Middle_NoDuplicates(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -636,9 +614,7 @@ func TestIfdBuilder_FindN__Middle_NoDuplicates(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_FindN__Miss(t *testing.T) {
|
func TestIfdBuilder_FindN__Miss(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -653,9 +629,7 @@ func TestIfdBuilder_FindN__Miss(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_Find__Hit(t *testing.T) {
|
func TestIfdBuilder_Find__Hit(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -717,9 +691,7 @@ func TestIfdBuilder_Find__Hit(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_Find__Miss(t *testing.T) {
|
func TestIfdBuilder_Find__Miss(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -774,9 +746,7 @@ func TestIfdBuilder_Find__Miss(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_Replace(t *testing.T) {
|
func TestIfdBuilder_Replace(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -842,9 +812,7 @@ func TestIfdBuilder_Replace(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_ReplaceN(t *testing.T) {
|
func TestIfdBuilder_ReplaceN(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -910,9 +878,7 @@ func TestIfdBuilder_ReplaceN(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_DeleteFirst(t *testing.T) {
|
func TestIfdBuilder_DeleteFirst(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1012,9 +978,7 @@ func TestIfdBuilder_DeleteFirst(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_DeleteN(t *testing.T) {
|
func TestIfdBuilder_DeleteN(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1114,9 +1078,7 @@ func TestIfdBuilder_DeleteN(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_DeleteN_Two(t *testing.T) {
|
func TestIfdBuilder_DeleteN_Two(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1200,9 +1162,7 @@ func TestIfdBuilder_DeleteN_Two(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_DeleteAll(t *testing.T) {
|
func TestIfdBuilder_DeleteAll(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1300,9 +1260,7 @@ func TestIfdBuilder_NewIfdBuilderFromExistingChain(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1402,9 +1360,7 @@ func TestIfdBuilder_SetStandardWithName_UpdateGps(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1481,9 +1437,7 @@ func ExampleIfdBuilder_SetStandardWithName_updateGps() {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1559,9 +1513,7 @@ func ExampleIfdBuilder_SetStandardWithName_timestamp() {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1624,9 +1576,7 @@ func TestIfdBuilder_NewIfdBuilderFromExistingChain_RealData(t *testing.T) {
|
||||||
|
|
||||||
// Decode from binary.
|
// Decode from binary.
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1922,9 +1872,7 @@ func ExampleIfd_Thumbnail() {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -1946,9 +1894,7 @@ func ExampleBuilderTag_SetValue() {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2005,9 +1951,7 @@ func ExampleIfdBuilder_SetStandardWithName() {
|
||||||
|
|
||||||
// Boilerplate.
|
// Boilerplate.
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2077,9 +2021,7 @@ func ExampleIfdBuilder_SetStandardWithName() {
|
||||||
func TestIfdBuilder_CreateIfdBuilderWithExistingIfd(t *testing.T) {
|
func TestIfdBuilder_CreateIfdBuilderWithExistingIfd(t *testing.T) {
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
mi, err := im.GetWithPath(exifcommon.IfdGpsInfoStandardIfdIdentity.UnindexedString())
|
mi, err := im.GetWithPath(exifcommon.IfdGpsInfoStandardIfdIdentity.UnindexedString())
|
||||||
|
@ -2152,9 +2094,7 @@ func TestNewStandardBuilderTag__TwoUnits(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestIfdBuilder_AddStandardWithName(t *testing.T) {
|
func TestIfdBuilder_AddStandardWithName(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2183,9 +2123,7 @@ func TestIfdBuilder_AddStandardWithName(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetOrCreateIbFromRootIb__Noop(t *testing.T) {
|
func TestGetOrCreateIbFromRootIb__Noop(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2204,9 +2142,7 @@ func TestGetOrCreateIbFromRootIb__Noop(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetOrCreateIbFromRootIb__FqNoop(t *testing.T) {
|
func TestGetOrCreateIbFromRootIb__FqNoop(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2225,9 +2161,7 @@ func TestGetOrCreateIbFromRootIb__FqNoop(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetOrCreateIbFromRootIb_InvalidChild(t *testing.T) {
|
func TestGetOrCreateIbFromRootIb_InvalidChild(t *testing.T) {
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -2249,9 +2183,7 @@ func TestGetOrCreateIbFromRootIb__Child(t *testing.T) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
|
@ -27,9 +27,7 @@ func TestIfdTagEntry_RawBytes_RealData(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -67,9 +65,7 @@ func TestIfd_FindTagWithId_Hit(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -94,9 +90,7 @@ func TestIfd_FindTagWithId_Miss(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -120,9 +114,7 @@ func TestIfd_FindTagWithName_Hit(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -148,9 +140,7 @@ func TestIfd_FindTagWithName_Miss(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -174,9 +164,7 @@ func TestIfd_FindTagWithName_NonStandard(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -200,9 +188,7 @@ func TestIfd_Thumbnail(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -244,9 +230,7 @@ func TestIfd_GpsInfo(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -287,9 +271,7 @@ func TestIfd_GpsInfo__2_0_0_0(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -334,9 +316,7 @@ func TestIfd_EnumerateTagsRecursively(t *testing.T) {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -492,9 +472,7 @@ func ExampleIfd_EnumerateTagsRecursively() {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -521,9 +499,7 @@ func ExampleIfd_GpsInfo() {
|
||||||
rawExif, err := SearchFileAndExtractExif(filepath)
|
rawExif, err := SearchFileAndExtractExif(filepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -549,9 +525,7 @@ func ExampleIfd_FindTagWithName() {
|
||||||
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
rawExif, err := SearchFileAndExtractExif(testImageFilepath)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
|
||||||
err = LoadStandardIfds(im)
|
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
|
@ -24,9 +24,9 @@ func getExifSimpleTestIb() *IfdBuilder {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im := exifcommon.NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
err := exifcommon.LoadStandardIfds(im)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -55,9 +55,9 @@ func getExifSimpleTestIbBytes() []byte {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im := exifcommon.NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
err := exifcommon.LoadStandardIfds(im)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
@ -91,9 +91,9 @@ func validateExifSimpleTestIb(exifData []byte, t *testing.T) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im := exifcommon.NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
err := exifcommon.LoadStandardIfds(im)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
|
@ -149,7 +149,9 @@ func GetFlatExifData(exifData []byte) (exifTags []ExifTag, err error) {
|
||||||
eh, err := ParseExifHeader(exifData)
|
eh, err := ParseExifHeader(exifData)
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
im := NewIfdMappingWithStandard()
|
im, err := exifcommon.NewIfdMappingWithStandard()
|
||||||
|
log.PanicIf(err)
|
||||||
|
|
||||||
ti := NewTagIndex()
|
ti := NewTagIndex()
|
||||||
|
|
||||||
ebs := NewExifReadSeekerWithBytes(exifData)
|
ebs := NewExifReadSeekerWithBytes(exifData)
|
||||||
|
|
Loading…
Reference in New Issue