webp

package
v0.0.0-...-6b0313b Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package webp implements a WebP image decoder and encoder.

Index

Constants

View Source
const DefaultQuality = 75

Variables

This section is empty.

Functions

func Decode

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

func DecodeConfig

func DecodeConfig(r io.Reader) (image.Config, error)

func Encode

func Encode(w io.Writer, m image.Image, o *Options) error

Types

type Options

type Options struct {
	Lossless bool
	Quality  int
	Exact    bool
}

Options are the encoding parameters. Quality ranges from 0 to 100 inclusive, higher is better. Exact preserves RGB values in transparent areas.

Jump to

Keyboard shortcuts

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