rotate

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RotateAny

type RotateAny struct {
	Angle string `json:"angle,omitempty"`
	Color string `json:"color,omitempty"`
}

RotateAny rotates an image by a specific angle counter-clockwise. Uncovered areas after the rotation are filled with the specified color.

func (*RotateAny) Apply

func (f *RotateAny) Apply(repl *caddy.Replacer, img image.Image) (image.Image, error)

Apply applies the image filter to an image and returns the new image.

func (RotateAny) CaddyModule

func (RotateAny) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*RotateAny) UnmarshalCaddyfile

func (f *RotateAny) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile configures the RotateAny instance.

Syntax:

rotate_any <angle> <color>

Parameters:

angle is the angle as floating point number in degrees by which the image is rotated counter-clockwise.

color is the color which is used to fill uncovered areas after the rotation. Supported formats are:

"#FFAADD" (in quotes because otherwise it will be a comment in a caddyfile)
rgb(255,170,221)
rgba(255,170,221,0.5)
transparent, black, white, blue or about 140 more

(see for many more supported color words https://www.w3schools.com/colors/colors_names.asp)

Jump to

Keyboard shortcuts

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