mdt

package
v0.0.0-...-df3f4e6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Package mdt provides tools to extract metadata from resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Width  int
	Height int
	Size   int64
	Format string
	Time   time.Time // Time is the image creation time
	Lat    float64   // Lat is the image latitude (if any)
	Lon    float64   // Lon is the image longitude (if any)

	Orientation Orientation // Exif orientation tag, if any.
}

func ImageFrom

func ImageFrom(fname string) (Image, error)

type Orientation

type Orientation uint8

EXIF orientation tag.

Valid values and meaning:

  • 1 = Horizontal (normal)
  • 2 = Mirror horizontal
  • 3 = Rotate 180
  • 4 = Mirror vertical
  • 5 = Mirror horizontal and rotate 270 CW
  • 6 = Rotate 90 CW
  • 7 = Mirror horizontal and rotate 90 CW
  • 8 = Rotate 270 CW

See:

https://exiftool.org/TagNames/EXIF.html

type Video

type Video struct {
	Width    int
	Height   int
	Size     int64
	Format   string
	Duration time.Duration
	Time     time.Time
}

func VideoFrom

func VideoFrom(fname string) (Video, error)

Jump to

Keyboard shortcuts

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