imageservice

package
v0.0.0-...-8aa74fd Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageService

type ImageService struct {
	JPG  JPG
	WEBP WEBP
}

func (*ImageService) GetNewBounds

func (i *ImageService) GetNewBounds(img image.Image, pixels int) (image.Point, error)

func (*ImageService) Resize

func (i *ImageService) Resize(img image.Image, newPoint image.Point) (image.Image, error)

type JPG

type JPG struct{}

func (*JPG) LoadImageFromFile

func (i *JPG) LoadImageFromFile(filePath string) (image.Image, error)

func (*JPG) LoadImageFromReader

func (i *JPG) LoadImageFromReader(r io.Reader) (image.Image, error)

func (*JPG) SaveImage

func (i *JPG) SaveImage(img image.Image, filePath string) error

type WEBP

type WEBP struct{}

Jump to

Keyboard shortcuts

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