Imgez

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Imgez_To_Image

func Imgez_To_Image(img Image) image.Image

Types

type Font added in v0.0.7

type Font struct {
	F *sfnt.Font
}

func LoadFont added in v0.0.7

func LoadFont(file string) (Font, error)

func (Font) Measure added in v0.0.7

func (f Font) Measure(text string, size float64) (float64, float64, error)

type Image

type Image []Pixel

func Image_To_Imgez

func Image_To_Imgez(img image.Image) Image

func NewImage

func NewImage(p RGBA, s Size) Image

func Open added in v0.0.6

func Open(filename string) (Image, error)

func Resize added in v0.0.4

func Resize(img Image, s Size) Image

func UrlImage added in v0.0.4

func UrlImage(url string) (Image, error)

func (*Image) At added in v0.0.6

func (i *Image) At(l Location) color.Color

func (*Image) Bounds added in v0.0.6

func (i *Image) Bounds() image.Rectangle

func (Image) Byte added in v0.0.7

func (img Image) Byte() ([]byte, error)

func (*Image) DrawLine added in v0.0.7

func (img *Image) DrawLine(clr RGBA, l1, l2 Location)

func (Image) Getsize added in v0.0.5

func (img Image) Getsize() Size

func (*Image) Opacity added in v0.0.6

func (img *Image) Opacity(opacity float64)

opacity (0.0 ~ 1.0)

func (*Image) Overlay

func (baseImg *Image) Overlay(overlayImg Image, l Location)

func (*Image) Resize added in v0.0.4

func (img *Image) Resize(s Size)

func (Image) SaveJPEG added in v0.0.6

func (img Image) SaveJPEG(filename string, quality int) error

func (Image) SavePNG

func (img Image) SavePNG(filename string) error

func (*Image) Shape added in v0.0.6

func (img *Image) Shape(percentage int)

percentage (0 ~ 100)

func (*Image) Text

func (baseImg *Image) Text(Font Font, Color RGBA, l Location, text string, size float64) error

type Location added in v0.0.7

type Location struct {
	X, Y int
}

func (*Location) Location added in v0.1.0

func (c *Location) Location(x, y int) *Location

type Pixel

type Pixel []RGBA

type RGB added in v0.1.0

type RGB struct {
	R, G, B uint8
}

func (*RGB) RGB added in v0.1.0

func (c *RGB) RGB(r, g, b uint8) *RGB

type RGBA added in v0.1.0

type RGBA struct {
	R, G, B, A uint8
}

func (*RGBA) RGBA added in v0.1.0

func (c *RGBA) RGBA(r, g, b, a uint8) *RGBA

type Size added in v0.0.7

type Size struct {
	Width, Height uint
}

func (*Size) Size added in v0.1.0

func (c *Size) Size(w, h uint) *Size

Jump to

Keyboard shortcuts

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