Kagami / Go Avif
Licence: other
π¨ Go AVIF library
Stars: β 195
Labels
Projects that are alternatives of or similar to Go Avif
Client
Knative developer experience, docs, reference Knative CLI implementation
Stars: β 193 (-1.03%)
Mutual labels: cli
Graphql Schema comparator
Get changes between two GraphQL schemas π€
Stars: β 196 (+0.51%)
Mutual labels: cli
Jl
jl β JSON Logs, a development tool for working with structured JSON logging.
Stars: β 194 (-0.51%)
Mutual labels: cli
Awesome Finder
π Search the awesome curated list without browser
Stars: β 194 (-0.51%)
Mutual labels: cli
Gossm
π»Interactive CLI tool that you can connect to ec2 using commands same as start-session, ssh in AWS SSM Session Manager
Stars: β 192 (-1.54%)
Mutual labels: cli
Hatch
A modern project, package, and virtual env manager for Python
Stars: β 2,268 (+1063.08%)
Mutual labels: cli
Bst
π§ Bespoken Tools - Tools for making voice apps faster and better
Stars: β 193 (-1.03%)
Mutual labels: cli
Ng Tailwindcss
A CLI tool for integrating Tailwind CSS into Angular-CLI projects
Stars: β 194 (-0.51%)
Mutual labels: cli
Fileicon
macOS CLI for managing custom icons for files and folders
Stars: β 196 (+0.51%)
Mutual labels: cli
Snapstub
Copy API endpoints to your fs and run a local server using them
Stars: β 193 (-1.03%)
Mutual labels: cli
Dcipher Cli
πCrack hashes using online rainbow & lookup table attack services, right from your terminal.
Stars: β 193 (-1.03%)
Mutual labels: cli
Scc
Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
Stars: β 2,943 (+1409.23%)
Mutual labels: cli
Zoxide
A smarter cd command. Supports all major shells.
Stars: β 4,422 (+2167.69%)
Mutual labels: cli
Sharprompt
Interactive command line interface toolkit for C#
Stars: β 197 (+1.03%)
Mutual labels: cli
go-avif implements AVIF (AV1 Still Image File Format) encoder for Go using libaom, the high quality AV1 codec.
Requirements
Make sure libaom is installed. On typical Linux distro just run:
sudo apt-get install libaom-dev
Usage
To use go-avif in your Go code:
import "github.com/Kagami/go-avif"
To install go-avif in your $GOPATH:
go get github.com/Kagami/go-avif
For further details see GoDoc documentation.
Example
package main
import (
"image"
_ "image/jpeg"
"log"
"os"
"github.com/Kagami/go-avif"
)
func main() {
if len(os.Args) != 3 {
log.Fatalf("Usage: %s src.jpg dst.avif", os.Args[0])
}
srcPath := os.Args[1]
src, err := os.Open(srcPath)
if err != nil {
log.Fatalf("Can't open sorce file: %v", err)
}
dstPath := os.Args[2]
dst, err := os.Create(dstPath)
if err != nil {
log.Fatalf("Can't create destination file: %v", err)
}
img, _, err := image.Decode(src)
if err != nil {
log.Fatalf("Can't decode source file: %v", err)
}
err = avif.Encode(dst, img, nil)
if err != nil {
log.Fatalf("Can't encode source image: %v", err)
}
log.Printf("Encoded AVIF at %s", dstPath)
}
CLI
go-avif comes with handy CLI utility avif
. It supports encoding of JPEG and
PNG files to AVIF:
# Compile and put avif binary to $GOPATH/bin
go get github.com/Kagami/go-avif/...
# Encode JPEG to AVIF with default settings
avif -e cat.jpg -o kitty.avif
# Encode PNG with slowest speed
avif -e dog.png -o doggy.avif --best -q 15
# Lossless encoding
avif -e pig.png -o piggy.avif --lossless
# Show help
avif -h
Static 64-bit builds for Windows, macOS and Linux are available at releases page. They include latest libaom from git at the moment of build.
Display
To display resulting AVIF files take a look at software listed here. E.g. use avif.js web viewer.
License
go-avif is licensed under CC0.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].