codec

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: Apache-2.0 Imports: 5 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, error)

EncodeJPEGToBase64 is to encode the image into string

func EncodeJPEGToBase64Data added in v2.0.3

func EncodeJPEGToBase64Data(img image.Image, quality int) (string, error)

EncodeJPEGToBase64Data is to encode the image into string

func EncodeJPEGToByte

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

EncodeJPEGToByte is to encode the image into a byte array

func EncodePNGToBase64

func EncodePNGToBase64(img image.Image) (string, error)

EncodePNGToBase64 is to encode the png into string

func EncodePNGToBase64Data added in v2.0.3

func EncodePNGToBase64Data(img image.Image) (string, error)

EncodePNGToBase64Data is to encode the png into string

func EncodePNGToByte

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

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