imageutil

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateImage

func GenerateImage(params ImageParams) *image.RGBA

GenerateImage creates an image based on the provided parameters

func ParseColor

func ParseColor(hex string) color.Color

Helper function to parse color from hex string

Types

type ImageParams

type ImageParams struct {
	BackgroundColor color.Color
	Width           int
	Height          int
	Pattern         string  // "solid", "gradient", "checkerboard", etc.
	Opacity         float64 // 0.0 to 1.0
	BorderWidth     int     // Width of the border, if any
	BorderColor     color.Color
}

ImageParams defines the parameters for generating an image

Jump to

Keyboard shortcuts

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