webpcodec

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MaxDimension = 16383

MaxDimension 是有损 WebP(VP8)支持的最大单边像素数。

Variables

View Source
var (

	// ErrDimensions 表示页面不能编码为有损 WebP 的尺寸。
	ErrDimensions = errors.New("WebP 图像宽高必须在 1 到 16383 像素之间")
)

Functions

func Encode

func Encode(w io.Writer, img image.Image) error

Encode 以固定质量 90 编码静态有损 WebP,并保留透明通道。

Types

This section is empty.

Jump to

Keyboard shortcuts

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