-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
# gifenc | ||
# 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 main | ||
|
||
import ( | ||
"github.com/Nota30/gifenc" | ||
) | ||
|
||
func main() { | ||
gify := gifenc.Config{} | ||
|
||
// Decode | ||
imgs, err := gify.Decode("gif path") | ||
if err != nil { | ||
println(err) | ||
} | ||
|
||
// Encode | ||
encoded, err := gify.Encode("folder path") | ||
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? |