exif

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToLatLong

func ConvertToLatLong(gpsInfo *GpsInfo) (float64, float64)

ConvertToLatLong converts GpsInfo into (lat, long) co-ordinates

Types

type GpsDegrees

type GpsDegrees struct {
	Orientation byte

	Degrees float64

	Minutes float64

	Seconds float64
}

GpsDegrees Taken from: https://github.com/dsoprea/go-exif/blob/master/v3/gps.go#L21

type GpsInfo

type GpsInfo struct {
	Latitude, Longitude GpsDegrees
	Altitude            int
	Timestamp           time.Time
}

GpsInfo represents a GPS co-ordinate

type RawExifBytes

type RawExifBytes = []byte

RawExifBytes represents exif section of an image as []byte

type RawImageBytes

type RawImageBytes = []byte

RawImageBytes represents entire image as []byte

type Reader

type Reader interface {
	GetExifBlob(image RawImageBytes) (rawExif RawExifBytes, err error)
	GetGPSInfo(exifData RawExifBytes) (*GpsInfo, error)
}

Reader parses EXIF data from and image

func NewExifReader

func NewExifReader(parsingLib ReaderType) (Reader, error)

NewExifReader creates a new instance of exif.Reader

type ReaderType

type ReaderType string

ReaderType represents the exif reader library to be used

const (
	// GoExifLibrary parse EXIF info using go-exif go module
	GoExifLibrary ReaderType = "go-exif"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL