Documentation ¶
Index ¶
- func ChunkImage(img image.Image) (image.Image, error)
- func EncodeVideo(rd io.Reader, output chan<- VideoChunk, opts EncoderOptions) error
- func GetPalette(img image.Image) color.Palette
- func Quantize(ref, img image.Image, speed int, dither float64) (image.Image, error)
- type AudioChunk
- type EncoderOptions
- type FrameChunk
- type FrameRow
- type FrameSplitter
- type VideoChunk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChunkImage ¶
ChunkImage chunks an image following the ComputerCraft requirements of maximum of 2 colors per 2x3 chunk of pixels and returns it. It is assumed that the palette has already been reduced to 16 colors.
func EncodeVideo ¶
func EncodeVideo(rd io.Reader, output chan<- VideoChunk, opts EncoderOptions) error
EncodeVideo encodes the video from the given reader which can be of any format that FFMPEG supports, into the output.
func GetPalette ¶
GetPalette returns the palette of the image.
Types ¶
type EncoderOptions ¶
type FrameChunk ¶
FrameChunk represents a frame chunk.
func GenerateFrameChunk ¶
func GenerateFrameChunk(img image.Image) (*FrameChunk, error)
GenerateFrameChunk generates a frame chunk for the given image.
type FrameSplitter ¶
FrameSplitter splits an image into multiple frames for multiple monitors.
type VideoChunk ¶
type VideoChunk struct { Frames []*FrameChunk Audio AudioChunk }
VideoChunk is composed of a Frame and Audio chunk.
Click to show internal directories.
Click to hide internal directories.