media

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(reader ContentReader, filename string) (image.Image, error)

Decode 从包内容读取器中读取并解码栅格图像。

func ExtractFirstImage

func ExtractFirstImage(filename string) (image.Image, error)

ExtractFirstImage 从基于 ZIP 的文件中提取第一张可以解码的图片。

func IsImageExtension

func IsImageExtension(ext string) bool

IsImageExtension 判断扩展名是否为支持的栅格图片格式。

Types

type ContentReader

type ContentReader interface {
	Read(string) ([]byte, error)
}

ContentReader 提供读取文件解压后内容的能力。

Jump to

Keyboard shortcuts

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