Documentation ¶
Index ¶
- Constants
- Variables
- func Decode(in image.Image, opts *DecodeOpts) ([]image.Image, error)
- func Encode(images []image.Image, opts *EncodeOpts) (image.Image, error)
- func NewAlpha(r image.Rectangle) draw.Image
- func NewAlpha16(r image.Rectangle) draw.Image
- func NewCMYK(r image.Rectangle) draw.Image
- func NewGray(r image.Rectangle) draw.Image
- func NewGray16(r image.Rectangle) draw.Image
- func NewNRGBA(r image.Rectangle) draw.Image
- func NewNRGBA64(r image.Rectangle) draw.Image
- func NewRGBA(r image.Rectangle) draw.Image
- func NewRGBA64(r image.Rectangle) draw.Image
- type DecodeOpts
- type EncodeOpts
Constants ¶
View Source
const (
DefaultImgsPerRow = 5
)
Variables ¶
View Source
var ( ErrNoImages = errors.New("no images passed to the encoder") ErrBadDimensions = errors.New("width and/or height of images passed is zero") )
Functions ¶
func Decode ¶
Decode takes in a image, assumed to be a spritesheet, and based on the options passed will chop up the spritesheet into seperate images. a width and height are needed to know the bounds of each image
func Encode ¶
Encode takes a slice of images and based on the encode options will turn the images into a single sprite sheet. If the images are not all the same size, encode will take the max height and max width of any image and use that as its dimensions. For best look, all images should be the same size.
func NewNRGBA64 ¶
NewNRGBA64 returns new image.NRGBA64
Types ¶
Click to show internal directories.
Click to hide internal directories.