webp

package module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 6 Imported by: 1

README

Build Status codecov Go Report Card GoDoc

Overview

Parse raw WEBP RIFF streams. There's an accessor to easily identify and extract the EXIF chunk.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoRiffFileHeader indicates that the file-header failed.
	ErrNoRiffFileHeader = errors.New("not on a RIFF file-header")

	// ErrNoWebpSignature indicates that the WEBP signature following the file-
	// header failed.
	ErrNoWebpSignature = errors.New("not a WEBP file")
)
View Source
var (
	// DefaultEndianness is the endianness of a standard RIFF stream.
	DefaultEndianness = binary.LittleEndian
)

Functions

func GetModuleRootPath

func GetModuleRootPath() string

GetModuleRootPath returns the root-path of the module.

func GetTestAssetsPath

func GetTestAssetsPath() string

GetTestAssetsPath returns the path of the test-assets.

func GetTestImageFilepath

func GetTestImageFilepath() string

GetTestImageFilepath returns the file-path of the common test-image.

Types

type ChunkVisitorFunc

type ChunkVisitorFunc func(fourCc [4]byte, dataGetter DataGetterFunc) (err error)

ChunkVisitorFunc is a callback that receives each chunk.

type DataGetterFunc

type DataGetterFunc func() (data []byte, err error)

DataGetterFunc is a lazy-getter for the payload data.

type WebpParser

type WebpParser struct {
	// contains filtered or unexported fields
}

WebpParser parses WEBP RIFF streams.

func NewWebpParser

func NewWebpParser(r io.Reader) *WebpParser

NewWebpParser returns a WebpParser.

Jump to

Keyboard shortcuts

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