image

package
v2.0.0-...-eb98602 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterWriter

type CounterWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewCounterWriter

func NewCounterWriter(w io.Writer) *CounterWriter

func (*CounterWriter) Bytes

func (w *CounterWriter) Bytes() uint64

func (*CounterWriter) Write

func (w *CounterWriter) Write(b []byte) (int, error)

type ImageHandler

type ImageHandler interface {
	Decode(in io.Reader, width, height int64, format string) (any, error)
	Resize(img any, size string, resizeType ResizeType) error
	Encode(img any, out io.Writer, format, tile string) (uint64, string, error)
	Sharpen(img any, sigmaRadius string) error
	Blur(img any, sigma string) error
	Release(img any) error
	GetDimension(img any) (width int, height int)
	Close() error
}

func NewImageHandler

func NewImageHandler(logger zLogger.ZLogger) ImageHandler

type ResizeType

type ResizeType int
const (
	ResizeTypeAspect ResizeType = iota
	ResizeTypeStretch
	ResizeTypeCrop
)

Jump to

Keyboard shortcuts

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