flipnotetools

package module
v0.0.0-...-068727b Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnimationPalette = []color.Color{
	color.RGBA{0, 0, 0, 255},
	color.RGBA{255, 255, 255, 255},
	color.RGBA{255, 0, 0, 255},
	color.RGBA{0, 0, 255, 255},
}
View Source
var ThumbnailPalette = []color.Color{
	color.RGBA{255, 255, 255, 255},
	color.RGBA{82, 82, 82, 255},
	color.RGBA{255, 255, 255, 255},
	color.RGBA{165, 165, 165, 255},
	color.RGBA{255, 0, 0, 255},
	color.RGBA{127, 0, 0, 255},
	color.RGBA{255, 127, 127, 255},
	color.RGBA{0, 255, 0, 255},
	color.RGBA{0, 0, 255, 255},
	color.RGBA{0, 0, 127, 255},
	color.RGBA{127, 127, 255, 255},
	color.RGBA{0, 255, 0, 255},
	color.RGBA{255, 0, 255, 255},
	color.RGBA{0, 255, 0, 255},
	color.RGBA{0, 255, 0, 255},
	color.RGBA{0, 255, 0, 255},
}

Functions

This section is empty.

Types

type Flipnote

type Flipnote struct {
	Frames []Frame
	Sounds [4]Sound

	FrameSpeed int
	SoundSpeed int

	Locked bool

	CreatorName    string
	LastEditorName string
	UserName       string

	Filename         string
	OriginalFilename string

	CreatorId        uint64
	PreviousEditorId uint64
	LastEditorId     uint64

	Date time.Time

	PreviewImage [64][48]byte
}

func ReadFlipnote

func ReadFlipnote(r io.Reader) (*Flipnote, error)

func (*Flipnote) FrameDuration

func (f *Flipnote) FrameDuration() float64

func (*Flipnote) MixedSoundAsPCM

func (f *Flipnote) MixedSoundAsPCM() ([]int16, int)

func (*Flipnote) SoundAsPCM

func (f *Flipnote) SoundAsPCM(id int) ([]int16, int)

func (*Flipnote) SoundDuration

func (f *Flipnote) SoundDuration() float64

type Frame

type Frame struct {
	Sound [4]bool
	// contains filtered or unexported fields
}

func (*Frame) Image

func (f *Frame) Image() image.Image

type Sound

type Sound []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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