lri

package
v0.0.0-...-c4fb985 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBodyMismatch    = errors.New("body mismatch")
	ErrMessageMismatch = errors.New("message mismatch")
)

Functions

This section is empty.

Types

type BType

type BType uint8
const (
	BType_LightHeader BType = iota
	BType_ViewPreferences
	BType_GPSData
)

type Block

type Block struct {
	Body      []byte
	Message   []byte
	BlockType BType
}

func NewBlock

func NewBlock(reader io.ReadSeeker) (*Block, error)

type BlockPreamble

type BlockPreamble struct {
	Magic         [4]byte
	BlockLen      uint64
	MessageOffset uint64
	MessageLength uint32
	BlockType     BType
	// contains filtered or unexported fields
}

type JpegRawImage

type JpegRawImage struct {
	Size       ltpb.Point2I
	Offset     ltpb.Point2I
	Monochrome bool
	Lengths    [4]uint32
	ExtraData  [1552]byte
	Data       [][]byte
	SensorType ltpb.SensorType
}

func (*JpegRawImage) Decode

func (jpImage *JpegRawImage) Decode(data []byte) error

func (*JpegRawImage) GetImages

func (jpImage *JpegRawImage) GetImages() ([]image.Image, error)

type LIRImagePart

type LIRImagePart interface {
	Decode(data []byte) error
	GetImages() ([]image.Image, error)
}

type LRIFile

type LRIFile struct {
	Images []RawImageData
	// contains filtered or unexported fields
}

func NewLRI

func NewLRI(reader io.ReadSeeker) (*LRIFile, error)

type PackedRawImage

type PackedRawImage struct {
	Size     ltpb.Point2I
	Offset   ltpb.Point2I
	Stride   uint64
	DataSize uint64
	Data     []uint16
}

func (*PackedRawImage) Decode

func (rImg *PackedRawImage) Decode(data []byte) error

func (*PackedRawImage) GetImages

func (rImg *PackedRawImage) GetImages() ([]image.Image, error)

type RawImageData

type RawImageData struct {
	Module  *ltpb.CameraModule
	Surface *ltpb.CameraModule_Surface
	Content LIRImagePart
}

func NewRawImage

func NewRawImage(module *ltpb.CameraModule, surface *ltpb.CameraModule_Surface, data []byte) (*RawImageData, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳