codec

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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 decodes a byte array to a JPEG image

func DecodeByteToPng

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

DecodeByteToPng decodes a byte array to a PNG image

func EncodeJPEGToBase64

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

EncodeJPEGToBase64 encodes a JPEG image to a Base64 string

func EncodeJPEGToBase64Data

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

EncodeJPEGToBase64Data encodes a JPEG image to Base64 data (without prefix)

func EncodeJPEGToByte

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

EncodeJPEGToByte encodes a JPEG image to a byte array

func EncodePNGToBase64

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

EncodePNGToBase64 encodes a PNG image to a Base64 string

func EncodePNGToBase64Data

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

EncodePNGToBase64Data encodes a PNG image to Base64 data (without prefix)

func EncodePNGToByte

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

EncodePNGToByte encodes a PNG image to 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