Documentation ¶
Index ¶
- func BuildAtlas(images []*image.RGBA, paddingX, paddingY int, allowRotation bool) (*image.RGBA, []geom.RectNode)
- func CropTransparentBorders(sourceImage image.Image) (*image.RGBA, geom.Insets)
- func FromBase64String(base64String string) (image.Image, error)
- func IsImageAreaEmpty(img image.Image, area geom.Rect) bool
- func IsImageEmpty(img image.Image) bool
- func MeasureTransparentInsets(img image.Image) (insets geom.Insets)
- func NewRGBAImageFromArea(img image.Image, area geom.Rect) *image.RGBA
- func NewRGBAImagesFromAreas(img image.Image, areas []geom.Rect, skipEmptyAreas bool) []*image.RGBA
- func Rotate90CCW(img image.Image) *image.RGBA
- func Rotate90CW(img image.Image) *image.RGBA
- func ToBase64String(img image.Image) (string, error)
- func ToBytes(img image.Image) ([]byte, error)
- func ToRGBA(img image.Image) *image.RGBA
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 IsImageAreaEmpty ¶
Check if an area is full of transparent pixels
func IsImageEmpty ¶
func MeasureTransparentInsets ¶
MeasureTransparentInsets returns how many rows an columns of fully transparent pixels there are around the image
func NewRGBAImagesFromAreas ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.