mirror of https://github.com/dsoprea/go-exif.git
Drop inline RELEASE TO-DOs from v2. They are now active tasks in v3.
parent
17a2176005
commit
4e059a6b95
|
@ -67,8 +67,6 @@ func NewIfdMappingWithStandard() (ifdMapping *IfdMapping) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// RELEASE(dustin): Add error return on next release
|
|
||||||
|
|
||||||
im := NewIfdMapping()
|
im := NewIfdMapping()
|
||||||
|
|
||||||
err := LoadStandardIfds(im)
|
err := LoadStandardIfds(im)
|
||||||
|
@ -654,8 +652,6 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// RELEASE(dustin): These are for backwards-compatibility. These used to be strings but are now IfdIdentity structs and the newer "StandardIfdIdentity" symbols above should be used instead. These will be removed in the next release.
|
|
||||||
|
|
||||||
IfdPathStandard = IfdStandardIfdIdentity
|
IfdPathStandard = IfdStandardIfdIdentity
|
||||||
IfdPathStandardExif = IfdExifStandardIfdIdentity
|
IfdPathStandardExif = IfdExifStandardIfdIdentity
|
||||||
IfdPathStandardExifIop = IfdExifIopStandardIfdIdentity
|
IfdPathStandardExifIop = IfdExifIopStandardIfdIdentity
|
||||||
|
|
|
@ -73,9 +73,6 @@ func DumpBytesClauseToString(data []byte) string {
|
||||||
// ExifFullTimestampString produces a string like "2018:11:30 13:01:49" from a
|
// ExifFullTimestampString produces a string like "2018:11:30 13:01:49" from a
|
||||||
// `time.Time` struct. It will attempt to convert to UTC first.
|
// `time.Time` struct. It will attempt to convert to UTC first.
|
||||||
func ExifFullTimestampString(t time.Time) (fullTimestampPhrase string) {
|
func ExifFullTimestampString(t time.Time) (fullTimestampPhrase string) {
|
||||||
|
|
||||||
// RELEASE(dustin): Dump this for the next release. It duplicates the same function now in exifcommon.
|
|
||||||
|
|
||||||
t = t.UTC()
|
t = t.UTC()
|
||||||
|
|
||||||
return fmt.Sprintf("%04d:%02d:%02d %02d:%02d:%02d", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second())
|
return fmt.Sprintf("%04d:%02d:%02d %02d:%02d:%02d", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second())
|
||||||
|
|
|
@ -9,23 +9,17 @@ import (
|
||||||
// TODO(dustin): This file now exists for backwards-compatibility only.
|
// TODO(dustin): This file now exists for backwards-compatibility only.
|
||||||
|
|
||||||
// NewIfdMapping returns a new IfdMapping struct.
|
// 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) {
|
func NewIfdMapping() (ifdMapping *exifcommon.IfdMapping) {
|
||||||
return exifcommon.NewIfdMapping()
|
return exifcommon.NewIfdMapping()
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewIfdMappingWithStandard retruns a new IfdMapping struct preloaded with the
|
// NewIfdMappingWithStandard retruns a new IfdMapping struct preloaded with the
|
||||||
// standard IFDs.
|
// standard IFDs.
|
||||||
//
|
|
||||||
// RELEASE(dustin): This is a bridging function for backwards-compatibility. Remove this in the next release.
|
|
||||||
func NewIfdMappingWithStandard() (ifdMapping *exifcommon.IfdMapping) {
|
func NewIfdMappingWithStandard() (ifdMapping *exifcommon.IfdMapping) {
|
||||||
return exifcommon.NewIfdMappingWithStandard()
|
return exifcommon.NewIfdMappingWithStandard()
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadStandardIfds loads the standard IFDs into the mapping.
|
// 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) {
|
func LoadStandardIfds(im *exifcommon.IfdMapping) (err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
if state := recover(); state != nil {
|
if state := recover(); state != nil {
|
||||||
|
|
|
@ -262,8 +262,6 @@ func (ie *IfdEnumerate) parseTag(ii *exifcommon.IfdIdentity, tagPosition int, bp
|
||||||
return ite, nil
|
return ite, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RELEASE(dustin): Drop fqIfdPath and ifdIndex arguments to visitor callback. They're both accessible on the IfdTagEntry struct.
|
|
||||||
|
|
||||||
// TagVisitorFn is called for each tag when enumerating through the EXIF.
|
// TagVisitorFn is called for each tag when enumerating through the EXIF.
|
||||||
type TagVisitorFn func(fqIfdPath string, ifdIndex int, ite *IfdTagEntry) (err error)
|
type TagVisitorFn func(fqIfdPath string, ifdIndex int, ite *IfdTagEntry) (err error)
|
||||||
|
|
||||||
|
@ -615,7 +613,6 @@ func (ie *IfdEnumerate) Scan(iiRoot *exifcommon.IfdIdentity, ifdOffset uint32, v
|
||||||
// Ifd represents a single, parsed IFD.
|
// Ifd represents a single, parsed IFD.
|
||||||
type Ifd struct {
|
type Ifd struct {
|
||||||
|
|
||||||
// RELEASE(dustin): !! Why are all of these exported? Stop doing this in the next release.
|
|
||||||
// TODO(dustin): Add NextIfd().
|
// TODO(dustin): Add NextIfd().
|
||||||
|
|
||||||
ifdIdentity *exifcommon.IfdIdentity
|
ifdIdentity *exifcommon.IfdIdentity
|
||||||
|
|
|
@ -75,9 +75,6 @@ func ParseExifFullTimestamp(fullTimestampPhrase string) (timestamp time.Time, er
|
||||||
// ExifFullTimestampString produces a string like "2018:11:30 13:01:49" from a
|
// ExifFullTimestampString produces a string like "2018:11:30 13:01:49" from a
|
||||||
// `time.Time` struct. It will attempt to convert to UTC first.
|
// `time.Time` struct. It will attempt to convert to UTC first.
|
||||||
func ExifFullTimestampString(t time.Time) (fullTimestampPhrase string) {
|
func ExifFullTimestampString(t time.Time) (fullTimestampPhrase string) {
|
||||||
|
|
||||||
// RELEASE(dustin): Dump this for the next release. It duplicates the same function now in exifcommon.
|
|
||||||
|
|
||||||
return exifcommon.ExifFullTimestampString(t)
|
return exifcommon.ExifFullTimestampString(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,8 +132,6 @@ func (et ExifTag) String() string {
|
||||||
len(et.ValueBytes), et.ChildIfdPath)
|
len(et.ValueBytes), et.ChildIfdPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RELEASE(dustin): In the next release, add an options struct to Scan() and GetFlatExifData(), and put the MiscellaneousExifData in the return.
|
|
||||||
|
|
||||||
// GetFlatExifData returns a simple, flat representation of all tags.
|
// GetFlatExifData returns a simple, flat representation of all tags.
|
||||||
func GetFlatExifData(exifData []byte) (exifTags []ExifTag, err error) {
|
func GetFlatExifData(exifData []byte) (exifTags []ExifTag, err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|
Loading…
Reference in New Issue