imagedata

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImageEmptyErr = errors.New("image is empty")
View Source
var ImageMissingDataErr = errors.New("missing image data")

Functions

This section is empty.

Types

type JPEGImageData

type JPEGImageData interface {
	Get() image.Image
	ToBytes() ([]byte, error)
	ToBytesWithQuality(imageQuality int) ([]byte, error)
	ToBase64() (string, error)
	ToBase64WithQuality(imageQuality int) (string, error)
	ToBase64Data() (string, error)
	ToBase64DataWithQuality(imageQuality int) (string, error)
	SaveToFile(filepath string, quality int) error
}

JPEGImageData .

func NewJPEGImageData

func NewJPEGImageData(img image.Image) JPEGImageData

NewJPEGImageData .

type PNGImageData

type PNGImageData interface {
	Get() image.Image
	ToBytes() ([]byte, error)
	ToBase64() (string, error)
	ToBase64Data() (string, error)
	SaveToFile(filepath string) error
}

PNGImageData .

func NewPNGImageData

func NewPNGImageData(img image.Image) PNGImageData

NewPNGImageData .

Jump to

Keyboard shortcuts

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