images

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResizeImage

func ResizeImage(ext string, input io.Reader, height uint, width uint) ([]byte, error)

Types

type ImageType added in v0.8.21

type ImageType interface {
	Decode(input io.Reader) (image.Image, error)
	Encode(w io.Writer, m image.Image) error
}

type JPEG added in v0.8.21

type JPEG struct {
	ImageType
}

func (JPEG) Decode added in v0.8.21

func (g JPEG) Decode(input io.Reader) (image.Image, error)

func (JPEG) Encode added in v0.8.21

func (g JPEG) Encode(w io.Writer, m image.Image) error

type PNG added in v0.8.21

type PNG struct {
	ImageType
}

func (PNG) Decode added in v0.8.21

func (g PNG) Decode(input io.Reader) (image.Image, error)

func (PNG) Encode added in v0.8.21

func (g PNG) Encode(w io.Writer, m image.Image) error

type ResizeTypeFn added in v0.8.21

type ResizeTypeFn = func(input io.Reader, height uint, width uint) ([]byte, error)

Jump to

Keyboard shortcuts

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