transformations

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DestinationImage

type DestinationImage struct {
	BgColor color.Color
	Width   int
	Height  int
	Format  string
	Quality int // lossy quality for JPEG & WEBP, 1 to 100 higher is better
}

type TransformationCtx

type TransformationCtx struct {
	Filters          []gift.Filter
	DestinationImage *DestinationImage
}

func GetContextFromString

func GetContextFromString(optionsStr string, srcImg image.Image, srcFormat string) (*TransformationCtx, error)

type TransformationOption

type TransformationOption int
const (
	Flip TransformationOption = iota + 1
	Blur
	Brightness
	Contrast
	Fit
	// The gamma transformation works differently from brightness - while brightness shifts all pixel values equally, gamma correction applies a curve that affects midtones more than highlights and shadows.
	Gamma
	Rotate
	Saturation
	Sharpen
	Background
	Width
	Height
	Format
	Quality
)

Jump to

Keyboard shortcuts

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