webp

package
v0.0.0-...-7641ad8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWebPDir = filepath.Join(map[string]string{
	"windows": filepath.Join(os.Getenv("APPDATA")),
	"darwin":  filepath.Join(os.Getenv("HOME"), ".cache"),
	"linux":   filepath.Join(os.Getenv("HOME"), ".cache"),
}[runtime.GOOS], "webp", libwebpVersion, "bin")

DefaultWebPDir for downloaded browser. For unix is "$HOME/.cache/webp/bin", for Windows it's "%APPDATA%\webp\bin"

Functions

func Encode

func Encode(w io.Writer, m image.Image, quality uint) error

func PrepareEncoder

func PrepareEncoder() error

Types

type Converter

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

func New

func New() *Converter

func (*Converter) ConvertChapter

func (converter *Converter) ConvertChapter(chapter *source.Chapter, quality uint8, progress func(string)) (*source.Chapter, error)

func (*Converter) Format

func (converter *Converter) Format() (format constant.ConversionFormat)

Jump to

Keyboard shortcuts

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