images

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 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

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

type JPEG

type JPEG struct {
	ImageType
}

func (JPEG) Decode

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

func (JPEG) Encode

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

type PNG

type PNG struct {
	ImageType
}

func (PNG) Decode

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

func (PNG) Encode

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

type ResizeTypeFn

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