Debian Codegraph @

/

debian golang-github-marekm4-color-extractor 1.2.1-1debian golang-github-marekm4-color-extractor-dev gomod github.com/marekm4/color-extractor debiangoinimakefilemarkdownshellyaml 15 files · 113 symbols
View dependency graph

Depends on

README (full)

Simple image color extractor written in Go with no external dependencies.

Go Reference Go Report Card Go Coverage

Demo:

https://color-extractor-demo.marekm4.com/

Blog post:

https://medium.com/@marek.michalik/c-vs-rust-vs-go-performance-analysis-945ab749056c

Usage:

package main

import (
	"fmt"
	"image"
	_ "image/jpeg"
	"os"

	"github.com/marekm4/color-extractor"
)

func main() {
	file := "Fotolia_45549559_320_480.jpg"
	imageFile, _ := os.Open(file)
	defer imageFile.Close()

	image, _, _ := image.Decode(imageFile)
	colors := color_extractor.ExtractColors(image)

	fmt.Println(colors)
}

Example image:

Image

Extracted colors:

Colors

dir .github/
dir debian/
dir example/
file LICENSE
file README.md
file color_extractor.go
file color_extractor_test.go
file go.mod