writer

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package writer 图片IO相关

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveGIF2Path

func SaveGIF2Path(path string, g *gif.GIF) error

SaveGIF2Path 保存 gif 到 path

func SavePNG2Path

func SavePNG2Path(path string, im image.Image) error

SavePNG2Path 保存 png 到 path

func ToBase64

func ToBase64(img image.Image) (base64Bytes []byte, err error)

ToBase64 img 内容转为base64

func ToBytes

func ToBytes(img image.Image) (data []byte, cl func())

ToBytes img 内容转为 []byte 使用完 data 后必须调用 cl 放回缓冲区

func WriteTo

func WriteTo(img image.Image, f io.Writer) (n int64, err error)

WriteTo img 内容写入 Writer

Types

This section is empty.

Jump to

Keyboard shortcuts

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