image_manger

package module
v0.0.0-...-f817122 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 8 Imported by: 1

README

image-manager

Mini library to prepare images in jpeg for web server: supports jpeg, png, gif, webp and corrects image orientation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageManager

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

func NewImageManager

func NewImageManager(targetDir string) *ImageManager

func (ImageManager) ProcessImage

func (im ImageManager) ProcessImage(source []byte, processingJobs ...*ImageProcessJob) (guids []uuid.UUID, err error)

func (ImageManager) ProcessImageAs16by9

func (im ImageManager) ProcessImageAs16by9(source []byte) (guids []uuid.UUID, err error)

func (ImageManager) ProcessImageAsSquare

func (im ImageManager) ProcessImageAsSquare(source []byte) (guids []uuid.UUID, err error)

type ImageProcessJob

type ImageProcessJob struct {
	Width  int
	Height int
	Anchor imaging.Anchor
}

func NewImageProcessJob

func NewImageProcessJob(width int, height int, anchor imaging.Anchor) *ImageProcessJob

Jump to

Keyboard shortcuts

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