go_watermark

package module
v0.0.0-...-90587ee Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

README

go-watermark

go library for adding watermark into image

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Opacity

func Opacity(imageObject image.Image, alpha float64) (
	img image.Image, err error)

Opacity setup image transparency level

func Resize

func Resize(imageObject image.Image, width uint, height uint) (
	img image.Image, err error)

Resize uses go standard image.Image, unsigned int for size width and height will return image object and error status

func Watermark

func Watermark(original string, watermark string, option *Option)

Types

type Option

type Option struct {
	Position Position
	Opacity  float64
}

type Position

type Position int
const (
	Tiles Position = iota
	TopLeft
	TopRight
	TopMiddle
	CenterLeft
	CenterRight
	CenterMiddle
	BottomLeft
	BottomRight
	BottomMiddle
)

func (Position) String

func (p Position) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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