image

package
v0.0.0-...-45acbec Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package image 提供图像解码功能(本库内部使用)。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte) (image.Image, error)

Decode 解码 JPEG/PNG 图像字节,返回 image.Image。

func Validate

func Validate(data []byte) error

Validate 校验字节是可解码的 JPEG/PNG,但只读文件头、不还原像素。

求解路径上真正解码是 wasm 里做的,这里只为在边界处给出类型化错误; 用 Decode 会为一张随即丢弃的位图付出整幅解码的代价。

Types

This section is empty.

Jump to

Keyboard shortcuts

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