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).
pull/3/head
Dustin Oprea 2018-06-06 05:17:56 -04:00
parent 1d7239382b
commit 4c58c1c84b
3 changed files with 2 additions and 6 deletions

View File

@ -17,10 +17,6 @@ const (
// offsets are relative to.
ExifAddressableAreaStart = uint32(0x6)
// RootIfdExifOffset is the relative offset of the first IFD in the block
// of EXIF data.
RootIfdExifOffset = uint32(0x0008)
// ExifDefaultFirstIfdOffset is essentially the number of bytes in addition
// to `ExifAddressableAreaStart` that you have to move in order to escape
// the rest of the header and get to the earliest point where we can put

View File

@ -234,7 +234,7 @@ func TestCollect(t *testing.T) {
tree := index.Tree
lookup := index.Lookup
if rootIfd.Offset != RootIfdExifOffset {
if rootIfd.Offset != uint32(0x0008) {
t.Fatalf("Root-IFD not correct: (0x%04d).", rootIfd.Offset)
} else if rootIfd.Id != 0 {
t.Fatalf("Root-IFD does not have the right ID: (%d)", rootIfd.Id)

View File

@ -537,7 +537,7 @@ func validateExifSimpleTestIb(exifData []byte, t *testing.T) {
t.Fatalf("IFD name not correct.")
} else if ifd.Index != 0 {
t.Fatalf("IFD index not zero: (%d)", ifd.Index)
} else if ifd.Offset != RootIfdExifOffset {
} else if ifd.Offset != uint32(0x0008) {
t.Fatalf("IFD offset not correct.")
} else if len(ifd.Entries) != 4 {
t.Fatalf("IFD number of entries not correct: (%d)", len(ifd.Entries))