wrapper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOutOfRange = errors.New("index out of range")
)
View Source
var (
	ErrUnknown = errors.New("unknown error")
)

Functions

This section is empty.

Types

type FlifDecoder

type FlifDecoder struct {
	CrcCheck bool
	Quality  int
	Scale    int
	Width    int
	Height   int
	Fit      bool
	// contains filtered or unexported fields
}

FlifDecoder FLIF_DECODER

func NewFlifDecoder

func NewFlifDecoder() *FlifDecoder

NewFlifDecoder flif_create_decoder

func (*FlifDecoder) Abort

func (d *FlifDecoder) Abort() error

Abort flif_abort_decoder

func (*FlifDecoder) DecodeFile

func (d *FlifDecoder) DecodeFile(name string) error

DecodeFile flif_decoder_decode_file

func (*FlifDecoder) DecodeMemory

func (d *FlifDecoder) DecodeMemory(data []byte) error

DecodeMemory flif_decoder_decode_memory

func (*FlifDecoder) Destroy

func (d *FlifDecoder) Destroy()

Destroy flif_destroy_decoder

func (*FlifDecoder) GetImage

func (d *FlifDecoder) GetImage() *FlifImage

GetImage flif_decoder_get_image TODO: this FlifImage must not destroy. should destroy from FlifDecoder.

func (*FlifDecoder) GetImageCount

func (d *FlifDecoder) GetImageCount() int

GetImageCount flif_decoder_num_images

func (*FlifDecoder) GetLoopCount

func (d *FlifDecoder) GetLoopCount() int

GetLoopCount flif_decoder_num_loops

type FlifEncoder

type FlifEncoder struct {
	Interlaced        bool
	LearnRepeat       int
	AutoColorBuckets  int
	PaletteSize       int
	Lookback          int
	Divisor           int
	MinSize           int
	SplitThreashold   int
	AlphaZeroLossless bool
	ChanceCutoff      int
	ChanceAlpha       int
	CrcCheck          bool
	ChannelCompact    int
	YCoCg             int
	FrameShape        int
	Lossy             int
	// contains filtered or unexported fields
}

func NewFlifEncoder

func NewFlifEncoder() *FlifEncoder

func (*FlifEncoder) AddImage

func (e *FlifEncoder) AddImage(image *FlifImage)

func (*FlifEncoder) Destroy

func (e *FlifEncoder) Destroy()

func (*FlifEncoder) Encode

func (e *FlifEncoder) Encode() ([]byte, error)

func (*FlifEncoder) EncodeFile

func (e *FlifEncoder) EncodeFile(name string) error

type FlifImage

type FlifImage struct {
	// contains filtered or unexported fields
}

FlifImage FLIF_IMAGE

func NewFlifImage

func NewFlifImage(width, height int) *FlifImage

func NewFlifImageFromGray

func NewFlifImageFromGray(width, height int, data []byte) *FlifImage

func NewFlifImageFromRGB

func NewFlifImageFromRGB(width, height int, data []byte) *FlifImage

func NewFlifImageFromRGBA

func NewFlifImageFromRGBA(width, height int, data []byte) *FlifImage

func NewFlifImageHDR

func NewFlifImageHDR(width, height int) *FlifImage

func (*FlifImage) Destroy

func (f *FlifImage) Destroy()

func (*FlifImage) GetChannel

func (f *FlifImage) GetChannel() int

func (*FlifImage) GetDepth

func (f *FlifImage) GetDepth() int

func (*FlifImage) GetFrameDelay

func (f *FlifImage) GetFrameDelay() int

func (*FlifImage) GetHeight

func (f *FlifImage) GetHeight() int

func (*FlifImage) GetImageCount

func (f *FlifImage) GetImageCount() int

func (*FlifImage) GetMetadata

func (f *FlifImage) GetMetadata(name string) []byte

func (*FlifImage) GetWidth

func (f *FlifImage) GetWidth() int

func (*FlifImage) ReadRowRGBA16

func (f *FlifImage) ReadRowRGBA16(row, index int) []byte

func (*FlifImage) ReadRowRGBA8

func (f *FlifImage) ReadRowRGBA8(row, index int) []byte

func (*FlifImage) SetFrameDelay

func (f *FlifImage) SetFrameDelay(delay int)

func (*FlifImage) SetMetadata

func (f *FlifImage) SetMetadata(name string, data []byte)

func (*FlifImage) WriteRowRGBA16

func (f *FlifImage) WriteRowRGBA16(row int, data []byte, index int) error

func (*FlifImage) WriteRowRGBA8

func (f *FlifImage) WriteRowRGBA8(row int, data []byte, index int) error

type FlifInfo

type FlifInfo struct {
	Width      int
	Height     int
	Channel    int
	Depth      int
	ImageCount int
}

FlifInfo FLIF_INFO

func GetInfo

func GetInfo(data []byte) *FlifInfo

GetInfo flif_info_xxx

Jump to

Keyboard shortcuts

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