Skip to content

no-bibi/img

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img

golang image to gray,binaryzation,reverse color

install

go get github.com/no-bibi/img

quick start

package main

import (
	"github.com/no-bibi/img"
)

func main() {

	file, _ := img.Read(`./enter.png`)

	//to make it gray
	grayed := img.Gray(file)
	img.Encode(grayed,`./enter_grap.png`)

	//want binary ? not problem (ps:you can adjust threshold between 0 - 255)
	binary := img.Binary(grayed, 180)
	img.Encode(binary,`./enter_binary.png`)

	//want reverse ? go on with Reverse
	reverse := img.Reverse(binary)
	img.Encode(reverse,`./enter_reverse.png`)
}

result

original:


gray :


binary :


reverse :


licenses

MIT

About

rgb img to gray ,binaryzation,reverse ....

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages