transform

package
v1.4.23 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CropImage

func CropImage(m image.Image, crop string) image.Image

CropImage performs cropping operations based on the api described: https://docs.fastly.com/api/imageopto/crop

func GetFit added in v1.3.7

func GetFit(fit string) string

GetFit will return the fit parameter.

func GetResampleFilter

func GetResampleFilter(filter string) imaging.ResampleFilter

GetResampleFilter gets the resample filter to use for resizing.

func GetResizeDimension added in v1.3.7

func GetResizeDimension(resize string) int

GetResizeDimension will get the resize dimension.

func Image

func Image(m image.Image, v url.Values) (image.Image, error)

Image transforms the image based on data found in the request. Following the available query params in the root README, this will parse the query params and apply image transformations.

func ResizeImage

func ResizeImage(m image.Image, w, h string, originalWidth, originalHeight int, fit string, filter imaging.ResampleFilter) image.Image

ResizeImage resizes the image with the given resample filter.

func RotateImage

func RotateImage(m image.Image, orient string) image.Image

RotateImage implements the rotating scheme described on: https://docs.fastly.com/api/imageopto/orient

Types

This section is empty.

Jump to

Keyboard shortcuts

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