image

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageType added in v0.2.0

type ImageType int //nolint: revive
const (
	ImageTypeJPEG ImageType = iota
	ImageTypePNG
	ImageTypeWEBP
	ImageTypeAVIF
)

type Options

type Options struct {
	Height         int
	Width          int
	Blur           float64
	Quality        int
	OriginalFormat ImageType
	Format         ImageType
}

func (Options) FileExtension added in v0.7.0

func (o Options) FileExtension() string

func (Options) FormatChanged added in v0.7.0

func (o Options) FormatChanged() bool

func (Options) FormatMimeType added in v0.7.0

func (o Options) FormatMimeType() string

func (Options) IsEmpty added in v0.1.5

func (o Options) IsEmpty() bool

type Transformer added in v0.1.5

type Transformer struct {
	// contains filtered or unexported fields
}

func NewTransformer added in v0.1.5

func NewTransformer() *Transformer

func (*Transformer) Run added in v0.1.5

func (t *Transformer) Run(
	orig io.Reader,
	length uint64,
	modified io.Writer,
	opts Options,
) error

func (*Transformer) Shutdown added in v0.1.5

func (t *Transformer) Shutdown()

Jump to

Keyboard shortcuts

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