imagex

package
v0.0.0-...-1356a85 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAtlas

func BuildAtlas(images []*image.RGBA, paddingX, paddingY int, allowRotation bool) (*image.RGBA, []geom.RectNode)

BuildAtlas generates an atlas image and returns it. It also returns info on how the rects have been packed

func CropTransparentBorders

func CropTransparentBorders(sourceImage image.Image) (*image.RGBA, geom.Insets)

func FromBase64String

func FromBase64String(base64String string) (image.Image, error)

func IsImageAreaEmpty

func IsImageAreaEmpty(img image.Image, area geom.Rect) bool

Check if an area is full of transparent pixels

func IsImageEmpty

func IsImageEmpty(img image.Image) bool

func MeasureTransparentInsets

func MeasureTransparentInsets(img image.Image) (insets geom.Insets)

MeasureTransparentInsets returns how many rows an columns of fully transparent pixels there are around the image

func NewRGBAImageFromArea

func NewRGBAImageFromArea(img image.Image, area geom.Rect) *image.RGBA

func NewRGBAImagesFromAreas

func NewRGBAImagesFromAreas(img image.Image, areas []geom.Rect, skipEmptyAreas bool) []*image.RGBA

func Rotate90CCW

func Rotate90CCW(img image.Image) *image.RGBA

func Rotate90CW

func Rotate90CW(img image.Image) *image.RGBA

func ToBase64String

func ToBase64String(img image.Image) (string, error)

func ToBytes

func ToBytes(img image.Image) ([]byte, error)

func ToRGBA

func ToRGBA(img image.Image) *image.RGBA

Types

This section is empty.

Jump to

Keyboard shortcuts

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