GithubHelp home page GithubHelp logo

cutereimu / neuquant Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 1.0 16 KB

Golang implementation of the NeuQuant image quantization algorithm by Anthony Dekker. Go语言版NeuQuant图像量化算法,算法原作者Anthony Dekker

License: Other

Go 100.00%

neuquant's Introduction

NeuQuant 图像量化算法

Neural network based color quantizer. Can be used to transform image.Image to image.Paletted.

颜色量化的神经网络算法。可以用来把任意图像转化为image.Paletted图像。

Install 安装方法

go get github.com/CuteReimu/neuquant

Usage 使用方法

package main

import (
	"github.com/CuteReimu/neuquant"
	"image/gif"
	"image/png"
	"os"
)

func main() {
	f, _ := os.Open("1.png")
	defer f.Close()
	img, _ := png.Decode(f)

	f2, _ := os.Create("1.gif")
	defer f2.Close()
	_ = gif.Encode(f2, img, neuquant.Opt())
}

License

The original NeuQuant Algorithm was developed by Anthony Dekker, 1994. See 'LICENSE'.

Golang implementation of NeuQuant Algorithm was done by CuteReimu, 2021.

neuquant's People

Contributors

cutereimu avatar

Stargazers

 avatar  avatar

Forkers

huangapple

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.