v5

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func AutolevelCommand added in v0.3.0

func AutolevelCommand(request *RequestV5, args string) error

func BrightnessCommand added in v0.3.0

func BrightnessCommand(request *RequestV5, args string) error

func CropCommand added in v0.3.0

func CropCommand(request *RequestV5, args string) error

func FlipFlopCommand added in v0.3.0

func FlipFlopCommand(request *RequestV5, args string) error

func FormatCommand added in v0.3.0

func FormatCommand(request *RequestV5, args string) error

func GrayscaleCommand added in v0.3.0

func GrayscaleCommand(request *RequestV5, args string) error

func InvertCommand added in v0.3.0

func InvertCommand(request *RequestV5, args string) error

func LegacyThumbnailCommand added in v0.3.0

func LegacyThumbnailCommand(request *RequestV5, args string) error

func NewSigner added in v0.3.0

func NewSigner(u *url.URL) (dims.UrlSigner, error)

func PassThroughCommand added in v0.3.0

func PassThroughCommand(request *RequestV5, args string) error

func QualityCommand added in v0.3.0

func QualityCommand(request *RequestV5, args string) error

func ResizeCommand added in v0.3.0

func ResizeCommand(request *RequestV5, args string) error

func RotateCommand added in v0.3.0

func RotateCommand(request *RequestV5, args string) error

func SepiaCommand added in v0.3.0

func SepiaCommand(request *RequestV5, args string) error

func SharpenCommand added in v0.3.0

func SharpenCommand(request *RequestV5, args string) error

func StripMetadataCommand added in v0.3.0

func StripMetadataCommand(request *RequestV5, args string) error

func ThumbnailCommand added in v0.3.0

func ThumbnailCommand(request *RequestV5, args string) error

Types

type RequestV5

type RequestV5 struct {
	dims.Request
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(r *http.Request, config dims.Config) *RequestV5

func (*RequestV5) ImageUrl added in v0.3.0

func (r *RequestV5) ImageUrl() string

func (*RequestV5) ProcessCommand added in v0.3.0

func (r *RequestV5) ProcessCommand(command dims.Command) error

func (*RequestV5) ProcessImage added in v0.3.0

func (r *RequestV5) ProcessImage() (string, []byte, error)

ProcessImage will execute the commands on the image.

func (*RequestV5) Sign

func (r *RequestV5) Sign() []byte

Sign returns a signed string using HMAC-SHA256-128.

func (*RequestV5) SignUrl added in v0.3.0

func (r *RequestV5) SignUrl() (string, error)

func (*RequestV5) ValidateSignature

func (r *RequestV5) ValidateSignature() bool

ValidateSignature verifies the signature of the image resize is valid.

type VipsCommand added in v0.3.0

type VipsCommand struct {
	dims.Command
	Operation VipsOperation
}

type VipsOperation added in v0.3.0

type VipsOperation func(request *RequestV5, args string) error

Jump to

Keyboard shortcuts

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