img

package
v0.0.0-...-561b508 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RandomImage

func RandomImage(i int) interface{}

RandomImage creates a random image. Environment variables supported: GG_IMG_FAST=Y/N to enable fast mode or not GG_IMG_FORMAT=jpg/png to choose the format GG_IMG_FILE_SIZE=10M to set image file size GG_IMG_SIZE=640x320 to set the {width}x{height} of image

func ToPng

func ToPng(img image.Image, appendBase64 bool) string

ToPng saves the image to local with PNG format.

func ToPngBytes

func ToPngBytes(img image.Image) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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