Versions in this module Expand all Collapse all v0 v0.2.1 Aug 26, 2026 v0.2.0 Aug 25, 2026 Changes in this version + func FrameScale(frame image.Point) int v0.1.0 Aug 25, 2026 Changes in this version + const MinWatermarkSize + var ErrInvalidColor = errors.New("invalid colour") + var ErrNotPNG = errors.New("not a png file") + var ErrUnknownPosition = errors.New("unknown watermark position") + var ErrUnsupportedFormat = errors.New("format cannot be written without ffmpeg") + var Positions = []Position + func DecodeFile(path string) (image.Image, error) + func DecodePNGFile(path string) (image.Image, error) + func DrawGradient(img *image.NRGBA, g Gradient) + func DrawVignette(img *image.NRGBA, mask []uint8) + func DrawWatermark(img *image.NRGBA, logo image.Image, marginPercent, opacity int, ...) + func Encode(w io.Writer, img image.Image, format clipper.Format, quality int) error + func EncodeFile(path string, img image.Image, format clipper.Format, quality int) error + func Fit(logo, frame image.Point, percent int) image.Point + func GradientBand(frame image.Point, percent int) int + func ParseHexColor(s string) (color.RGBA, error) + func Place(logo, frame image.Point, marginPercent int, position Position) image.Point + func PositionList() string + func ScaleLogo(logo image.Image, frame image.Point, sizePercent int) *image.NRGBA + func VignetteMask(frame image.Point, v Vignette) []uint8 + type Compositor struct + func New(spec Spec) *Compositor + func (c *Compositor) Active() bool + func (c *Compositor) Compose(req clipper.ComposeRequest) (clipper.ComposeResult, error) + func (c *Compositor) Discard(raw string) + func (c *Compositor) Staging(dest string) string + type Gradient struct + Color color.RGBA + HeightPercent int + Opacity int + func (g Gradient) Active() bool + type Position int + const BottomLeft + const BottomRight + const TopLeft + const TopRight + func ParsePosition(s string) (Position, error) + func (p Position) String() string + type Spec struct + Gradient Gradient + Vignette Vignette + Watermark Watermark + func (s Spec) Active() bool + type Vignette struct + Opacity int + RadiusPercent int + SoftnessPercent int + func (v Vignette) Active() bool + type Watermark struct + Logo image.Image + MarginPercent int + Opacity int + Position Position + SizePercent int + func (w Watermark) Active() bool