Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions exiftool.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const (

type Exif struct {
DateTimeOriginal string
LensModel string
LensID string
ShutterSpeed string
Aperture string
ISO string
FocalLength string
GPS struct {
Latitude float64
Longitude float64
Expand Down Expand Up @@ -91,6 +97,18 @@ func parseOutput(out []byte) (*Exif, error) {

if ok, _ := regexp.MatchString("Date/Time Original", field); ok {
e.DateTimeOriginal = value
} else if ok, _ := regexp.MatchString("Lens Model", field); ok {
e.LensModel = value
} else if ok, _ := regexp.MatchString("Lens ID", field); ok {
e.LensID = value
} else if ok, _ := regexp.MatchString("Shutter Speed", field); ok {
e.ShutterSpeed = value
} else if ok, _ := regexp.MatchString("Aperture", field); ok {
e.Aperture = value
} else if ok, _ := regexp.MatchString("ISO", field); ok {
e.ISO = value
} else if ok, _ := regexp.MatchString("Focal Length", field); ok {
e.FocalLength = value
} else if ok, _ := regexp.MatchString("GPS Latitude +$", field); ok {
v, err := valueForCoordinateString(value)
if err == nil {
Expand Down