utilImg

package
v0.0.0-...-5f3621a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MulanPSL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64FromBuffer

func Base64FromBuffer(buf bytes.Buffer) string

Base64FromBuffer accepts a buffer and returns a base64 encoded string.

func Base64FromLocal

func Base64FromLocal(fname string) (string, error)

Base64FromLocal reads a local file and returns the base64 encoded version.

func Base64FromRemote

func Base64FromRemote(url string) string

Base64FromRemote is a better named function that presently calls NewImage which will be deprecated. Function accepts an RFC compliant URL and returns a base64 encoded result.

func SaveBase64ToFile

func SaveBase64ToFile(data string, dir string, name string) (string, error)

func SaveImage

func SaveImage(p string, src image.Image) error

func WaterMarkString

func WaterMarkString(dst draw.Image, s string, font string, fontSize float64, x int, y int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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