Comments (2)
运行go test
能在目录下正常产生测试图像吗?
from identicon.
抱歉,是我直接抄你的示例造成的错,把前后景的空color.NRGBA{}照复制进去了,此问题可以关闭了.
另外,go test 也可以生成77张测试图片,结果是ok 和pass.
package main
import (
"fmt"
"github.com/issue9/identicon"
"image/color"
"image/png"
"os"
)
func main() {
//img, e := identicon.Make(256, color.NRGBA{}, color.NRGBA{}, []byte("YouGam!"))
img, e := identicon.Make(256, color.RGBA{255, 0, 0, 100}, color.RGBA{0, 255, 255, 100}, []byte("YouGam"))
if e != nil {
fmt.Println(e)
return
}
fi, e := os.Create("img.png")
if e != nil {
fmt.Println(e)
return
}
defer fi.Close()
png.Encode(fi, img)
}
from identicon.
Related Issues (5)
- 产生的图片右边多了一个象素的空白
- 产生的图片少了一个像素
- 生成的图片有锯齿 HOT 1
- 希望可以加入去掉边框的选项 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identicon.