layers

package
v0.0.0-...-69312e8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SizeOfDataHeader = 36

Variables

This section is empty.

Functions

func DHash

func DHash(data []byte) []byte

func LZ4Decode

func LZ4Decode(data []byte) ([]byte, error)

func LZ4Encode

func LZ4Encode(data []byte) ([]byte, error)

func NewDataHeader

func NewDataHeader(data []byte) ([]byte, error)

func ZeroPadding

func ZeroPadding(data []byte, blocksize int) []byte

Types

type DataHeader

type DataHeader struct {
	Length    uint32 //32byte
	Signature []byte //256byte
}

func GetDataHeader

func GetDataHeader(data []byte) (*DataHeader, error)

type ImageBrush

type ImageBrush struct {
	Height, Width uint
	PixelChan     chan color.NRGBA
	ByteChan      chan byte
	IntChan       chan int
}

func NewImageBrush

func NewImageBrush(x, y uint) *ImageBrush

func (*ImageBrush) Draw

func (IB *ImageBrush) Draw(data []byte) (*image.NRGBA, error)

func (*ImageBrush) Extract

func (IB *ImageBrush) Extract(img image.Image) error

func (*ImageBrush) ReadFromBytesChan

func (IB *ImageBrush) ReadFromBytesChan(size int) []byte

func (*ImageBrush) SerializeTo

func (IB *ImageBrush) SerializeTo(data []byte) error

type PNG

type PNG struct {
	Height, Width uint
}

func NewPNG

func NewPNG(size uint) *PNG

func NewSepPNG

func NewSepPNG(x, y uint) *PNG

func (*PNG) Decode

func (p *PNG) Decode(b []byte, fix bool) ([]byte, error)

func (*PNG) Encode

func (p *PNG) Encode(data []byte, fix bool) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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