petpet

package
v0.0.0-...-3b24cdd Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: BSL-1.0 Imports: 13 Imported by: 0

README

petpet

A library for generating pet-pet gifs.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Width:    128,
	Height:   128,
	Delay:    4,
	Disposal: 0x02,
}

Functions

func MakeAPNG

func MakeAPNG(source io.Reader, writer io.Writer, config Config) error

func MakeGif

func MakeGif(source io.Reader, w io.Writer, config Config, quantizer Quantizer) error

MakeGif генерирует pet-pet гифку. `source` должен быть типом io.Reader и содержать PNG изображение.

Types

type Config

type Config struct {
	Width    int  // Recommend 128
	Height   int  // Recommend 128
	Delay    int  // Recommend 2-10
	Disposal byte // Recommend 0x02
}

type Quantizer

type Quantizer interface {
	QuantizeImage(img image.Image, count int) (color.Palette, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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