mirror of https://github.com/dsoprea/go-exif.git
ifd_enumerate.go: We now log the approximate size of the EXIF blob
parent
af2e8222eb
commit
8e727e3388
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue