Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nota30/gifenc
A minimal and simple to use GIF encoder
https://github.com/nota30/gifenc
gif-encoder go golang
Last synced: about 1 month ago
JSON representation
A minimal and simple to use GIF encoder
- Host: GitHub
- URL: https://github.com/nota30/gifenc
- Owner: Nota30
- License: mit
- Created: 2024-02-10T09:49:15.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-12T03:15:56.000Z (11 months ago)
- Last Synced: 2024-06-21T08:18:22.027Z (7 months ago)
- Topics: gif-encoder, go, golang
- Language: Go
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gifenc
A Golang based GIF encoder/decoder
- Convert GIFs to images and images to GIFs## Prerequisites
- [Go](https://go.dev/)
## Quick Start
Import the `gifenc` package first.
```go
package mainimport (
"github.com/Nota30/gifenc"
)func main() {
gify := gifenc.Config{}// Decode
var gif *gif.GIF // Provide a gif
imgs, err := gify.Decode(gif)
if err != nil {
println(err)
}// Encode
var images []image.Image // Provide an array of images
encoded, err := gify.Encode(images)
if err != nil {
println(err)
}
}
```
You can view examples in the `test/test.go` file.## Issues
- This package uses Floyd–Steinberg dithering so the GIF result might not be what you expected.
- Maybe adding other dithering algorithms at a later release?