codec

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeByteToJpeg

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

DecodeByteToJpeg is to decode the byte array into an image

func DecodeByteToPng

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

DecodeByteToPng is to decode the byte array into a png

func EncodeJPEGToBase64

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

EncodeJPEGToBase64 is to encode the image into string

func EncodeJPEGToByte

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

EncodeJPEGToByte is to encode the image into a byte array

func EncodePNGToBase64

func EncodePNGToBase64(img image.Image) string

EncodePNGToBase64 is to encode the png into string

func EncodePNGToByte

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

EncodePNGToByte is to encode the png into a byte array

Types

This section is empty.

Jump to

Keyboard shortcuts

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