webp

package
v0.0.0-...-bae2323 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeWebp

func DecodeWebp(r io.Reader) (image.Image, error)

DecodeWebp a webp file and return an image.

func EncodeWebp

func EncodeWebp(i image.Image, o *Options) (buf bytes.Buffer, err error)

EncodeWebp encodes an image into webp and returns a buffer.

Types

type Options

type Options struct {
	Lossless bool `json:"lossless"`
	Quality  int  `json:"quality"`
}

Options represent WebP encoding options.

Jump to

Keyboard shortcuts

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