resizegif

package module
v0.0.0-...-ca2560a Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: MIT Imports: 6 Imported by: 0

README

resizegif.go

Resize animated GIF file without destroying animation Inspired by go-scratch

Methods

// Resize the gif to another thumbnail gif
func Resize(srcFile string, width int, height int) (*gif.GIF, error)

// Save gif to file
func Save(gifImg *gif.GIF, desFile string) error

Usage

// To generate a width 100px gif from the given demo.gif
img, err := resizegif.Resize("demo.gif", 100, 0)
resizegif.Save(img, "demo.w100.gif")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageToPaletted

func ImageToPaletted(img image.Image) *image.Paletted

func Resize

func Resize(srcFile string, width int, height int) (*gif.GIF, error)

Resize the gif to another thumbnail gif

func Save

func Save(gifImg *gif.GIF, desFile string) error

Save gif file

Types

This section is empty.

Jump to

Keyboard shortcuts

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