image

package
v0.0.0-...-fddbd36 Latest Latest
Warning

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

Go to latest
Published: May 1, 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 Image

type Image struct {
	Ext       string
	Size      int
	ImgBuffer image.Image
}

func New

func New(file []byte) (*Image, error)

New image processing

func (*Image) Resize

func (t *Image) Resize(width int, height int) error

Resize image resizing

func (*Image) Save

func (t *Image) Save(quality int) ([]byte, error)

Save image

func (*Image) Watermark

func (t *Image) Watermark(file string, pos WaterPos, quality float64, imgMargin int) error

Watermark image watermarking

type WaterPos

type WaterPos int

WaterPos Watermark position

const (
	PosTop WaterPos = iota
	PostTopLeft
	PostTopRight
	PosLeft
	PosCenter
	PosRight
	PosBottom
	PosBottomLeft
	PosBottomRight
)

Jump to

Keyboard shortcuts

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