imageprocessor

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeGIF added in v1.2.3

func EncodeGIF(img *image.Image, q int) (io.Reader, error)

func EncodeJpeg

func EncodeJpeg(img *image.Image, q int) (io.Reader, error)

func EncodePNG added in v1.2.3

func EncodePNG(img *image.Image, q int) (io.Reader, error)

func EncodeWebP added in v1.4.0

func EncodeWebP(img *image.Image, q int, lossless bool) (io.Reader, error)

func Set404Image

func Set404Image(path string, w uint, h uint, c color.Color, maxW uint, maxH uint) (io.Reader, error)

Types

type Image

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

func DecodeImage

func DecodeImage(r io.Reader) (*Image, error)

DecodeImage is return image.Image

func (*Image) ConvertColor added in v1.2.3

func (i *Image) ConvertColor(networkPath string) error

func (*Image) Crop added in v1.2.0

func (i *Image) Crop(w uint, h uint)

func (*Image) GetFormat added in v1.2.3

func (i *Image) GetFormat() string

func (*Image) GetImg

func (i *Image) GetImg() *image.Image

func (*Image) ResizeAndFill

func (i *Image) ResizeAndFill(w uint, h uint, c color.Color, maxW uint, maxH uint)

Jump to

Keyboard shortcuts

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