helper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: GPL-3.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFileTo

func CopyFileTo(srcPath, destPath string) error

func DecodeByteToJpeg

func DecodeByteToJpeg(b []byte) (img image.Image, err error)

DecodeByteToJpeg 字节编码图片

func DecodeByteToPng

func DecodeByteToPng(b []byte) (img image.Image, err error)

DecodeByteToPng 字节编码图片

func EncodeJPEGToBase64

func EncodeJPEGToBase64(img image.Image, quality int) string

EncodeJPEGToBase64 base64编码

func EncodeJPEGToByte

func EncodeJPEGToByte(img image.Image, quality int) (ret []byte)

EncodeJPEGToByte 图片编码二进制,IMAGE格式

func EncodePNGToBase64

func EncodePNGToBase64(img image.Image) string

EncodePNGToBase64 base64编码

func EncodePNGToByte

func EncodePNGToByte(img image.Image) (ret []byte)

EncodePNGToByte 图片编码二进制,PNG格式

func GetPWD

func GetPWD() string

GetPWD .

func LoadFont

func LoadFont(p string) (*truetype.Font, error)

func LoadJpeg

func LoadJpeg(p string) (image.Image, error)

func LoadPNG

func LoadPNG(p string) (image.Image, error)

func StringToMD5

func StringToMD5(src string) string

StringToMD5 MD5

Types

This section is empty.

Jump to

Keyboard shortcuts

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