ifd_enumerate.go: We now log the approximate size of the EXIF blob

dustin/add_skipped_tags_tracking
Dustin Oprea 2020-05-18 01:15:29 -04:00
parent af2e8222eb
commit 8e727e3388
1 changed files with 6 additions and 2 deletions

View File

@ -450,8 +450,8 @@ func (ie *IfdEnumerate) parseThumbnail(offsetIte, lengthIte *IfdTagEntry) (thumb
return thumbnailData, nil
}
// scan parses and enumerates the different IFD blocks out of a byte-slice and
// invokes a visitor callback along the way. No information is kept or returned.
// scan parses and enumerates the different IFD blocks and invokes a visitor
// callback for each tag. No information is kept or returned.
func (ie *IfdEnumerate) scan(ifdName string, ifdOffset uint32, visitor TagVisitorFn) (err error) {
defer func() {
if state := recover(); state != nil {
@ -508,6 +508,8 @@ func (ie *IfdEnumerate) Scan(rootIfdName string, ifdOffset uint32, visitor TagVi
err = ie.scan(rootIfdName, ifdOffset, visitor)
log.PanicIf(err)
ifdEnumerateLogger.Debugf(nil, "Scan: It looks like the furthest offset that contained EXIF data in the EXIF blob was (%d) (Scan).", ie.FurthestOffset())
return nil
}
@ -1251,6 +1253,8 @@ func (ie *IfdEnumerate) Collect(rootIfdOffset uint32) (index IfdIndex, err error
err = ie.setChildrenIndex(index.RootIfd)
log.PanicIf(err)
ifdEnumerateLogger.Debugf(nil, "Collect: It looks like the furthest offset that contained EXIF data in the EXIF blob was (%d).", ie.FurthestOffset())
return index, nil
}