mdimg

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "images"

Variables

This section is empty.

Functions

func GetCaptureTime

func GetCaptureTime(id string, dbconn *sqlite3.SQLite) (time.Time, error)

func LoadConfig

func LoadConfig(dbconn *sqlite3.SQLite) error

Types

type ImageState

type ImageState int
const (
	CACHE ImageState = 1
	SAVED ImageState = 2
)

type MDImage

type MDImage struct {
	ID          int
	Device      string
	State       ImageState
	Captured    time.Time
	Trigger     bool
	PreRecoding float64 // second
	Overrun     float64 // second
	Jpeg        []byte
	typemd.Resolution
}

func (*MDImage) EncodeImage

func (md *MDImage) EncodeImage(img image.Image) error

func (*MDImage) GetImage

func (md *MDImage) GetImage() (image.Image, error)

func (*MDImage) Load

func (md *MDImage) Load(id string, dbconn *sqlite3.SQLite) (bool, error)

func (*MDImage) LoadInfo

func (md *MDImage) LoadInfo(id string, dbconn *sqlite3.SQLite) (bool, error)

func (*MDImage) Save

func (md *MDImage) Save(tx *sql.Tx) error

Jump to

Keyboard shortcuts

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