All Projects β†’ Kagami β†’ Go Avif

Kagami / Go Avif

Licence: other
🎨 Go AVIF library

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Avif

Botany
command line virtual plant buddy
Stars: ✭ 192 (-1.54%)
Mutual labels:  cli
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
Npmvet
A simple CLI tool for vetting npm package versions
Stars: ✭ 193 (-1.03%)
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
Twf
Standalone tree view file explorer, inspired by fzf.
Stars: ✭ 196 (+0.51%)
Mutual labels:  cli
Clispinner
Swifty Terminal Spinner
Stars: ✭ 197 (+1.03%)
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
Gotty Client
πŸ”§ terminal client for GoTTY
Stars: ✭ 196 (+0.51%)
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
Twitch Dl
CLI tool for downloading videos from Twitch.
Stars: ✭ 194 (-0.51%)
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 Build Status GoDoc

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].