gifresize

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 5 Imported by: 1

README

gifresize GoDoc Apache 2.0 License

gifresize is a simple go package for transforming animated GIFs.

Import using:

import "willnorris.com/go/gifresize"

Then call gifresize.Process with the source io.Reader and destination io.Writer as well as the transformation to be applied to each frame in the GIF. See example/main.go for a simple example.

Documentation

Overview

Package gifresize resizes animated gifs.

Frames in an animated gif aren't necessarily the same size, subsequent frames are overlayed on previous frames. Therefore, resizing the frames individually may cause problems due to aliasing of transparent pixels. This package tries to avoid this by building frames from all previous frames and resizing the frames as RGB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process(w io.Writer, r io.Reader, transform TransformFunc) error

Process the GIF read from r, applying transform to each frame, and writing the result to w.

Types

type TransformFunc

type TransformFunc func(image.Image) image.Image

TransformFunc is a function that transforms an image.

Directories

Path Synopsis
The example tool demonstrates use of the gifresize package by resizing an image.
The example tool demonstrates use of the gifresize package by resizing an image.

Jump to

Keyboard shortcuts

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