commands

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VipsExportCommands = map[string]VipsExportOperation{
	"strip":   StripMetadataCommand,
	"format":  FormatCommand,
	"quality": QualityCommand,
}
View Source
var VipsRequestCommands = map[string]VipsRequestOperation{
	"watermark": Watermark,
}
View Source
var VipsTransformCommands = map[string]VipsTransformOperation{
	"crop":             CropCommand,
	"resize":           ResizeCommand,
	"sharpen":          SharpenCommand,
	"brightness":       BrightnessCommand,
	"flipflop":         FlipFlopCommand,
	"sepia":            SepiaCommand,
	"grayscale":        GrayscaleCommand,
	"autolevel":        AutolevelCommand,
	"invert":           InvertCommand,
	"rotate":           RotateCommand,
	"thumbnail":        ThumbnailCommand,
	"legacy_thumbnail": LegacyThumbnailCommand,
}

Functions

func AutolevelCommand

func AutolevelCommand(image *vips.ImageRef, args string) error

func BrightnessCommand

func BrightnessCommand(image *vips.ImageRef, args string) error

func CropCommand

func CropCommand(image *vips.ImageRef, args string) error

func FlipFlopCommand

func FlipFlopCommand(image *vips.ImageRef, args string) error

func FormatCommand

func FormatCommand(image *vips.ImageRef, args string, opts *ExportOptions) error

func GrayscaleCommand

func GrayscaleCommand(image *vips.ImageRef, args string) error

func InvertCommand

func InvertCommand(image *vips.ImageRef, args string) error

func LegacyThumbnailCommand

func LegacyThumbnailCommand(image *vips.ImageRef, args string) error

func PassThroughCommand

func PassThroughCommand(ctx context.Context, args string) error

func QualityCommand

func QualityCommand(image *vips.ImageRef, args string, opts *ExportOptions) error

func ResizeCommand

func ResizeCommand(image *vips.ImageRef, args string) error

func RotateCommand

func RotateCommand(image *vips.ImageRef, args string) error

func SepiaCommand

func SepiaCommand(image *vips.ImageRef, args string) error

func SharpenCommand

func SharpenCommand(image *vips.ImageRef, args string) error

func StripMetadataCommand

func StripMetadataCommand(image *vips.ImageRef, args string, ops *ExportOptions) error

func ThumbnailCommand

func ThumbnailCommand(image *vips.ImageRef, args string) error

func Watermark

func Watermark(image *vips.ImageRef, args string, data RequestOperation) error

Types

type Command

type Command struct {
	Name string
	Args string
}

type OperationError

type OperationError struct {
	core.StatusError
	Command string
	Args    string
}

func NewOperationError

func NewOperationError(command string, args string, message string) *OperationError

func (*OperationError) Error

func (e *OperationError) Error() string

type RequestOperation

type RequestOperation struct {
	URL    *url.URL    // The URL of the image being processed
	Config core.Config // The global configuration.
}

type VipsCommand

type VipsCommand[T any] struct {
	Command
	Operation T
}

type VipsExportOperation

type VipsExportOperation func(image *vips.ImageRef, args string, opts *ExportOptions) error

type VipsRequestOperation

type VipsRequestOperation func(image *vips.ImageRef, args string, data RequestOperation) error

type VipsTransformOperation

type VipsTransformOperation func(image *vips.ImageRef, args string) error

Jump to

Keyboard shortcuts

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