added controls
This commit is contained in:
parent
9ef7d28c46
commit
45063b7d97
3 changed files with 167 additions and 3 deletions
|
|
@ -90,6 +90,14 @@ func check(c color.Color) bool {
|
|||
//}
|
||||
return false
|
||||
}
|
||||
func check2(c color.Color) bool {
|
||||
//r, g, b, _ := c.RGBA()
|
||||
r, g, b, _ := c.RGBA()
|
||||
if r < 10000 && g > 8000 && b > 8000 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func set(img *image.RGBA, x, y int) {
|
||||
img.Set(x, y, color.White)
|
||||
|
|
@ -102,6 +110,10 @@ func set(img *image.RGBA, x, y int) {
|
|||
//}
|
||||
}
|
||||
|
||||
func set2(img *image.RGBA, x, y int) {
|
||||
img.Set(x, y, color.RGBA{90, 90, 90, 0})
|
||||
}
|
||||
|
||||
func mark(img image.Image) {
|
||||
o := jpeg.Options{100}
|
||||
r := img.Bounds()
|
||||
|
|
@ -119,6 +131,9 @@ func mark(img image.Image) {
|
|||
if check(img.At(x, y)) {
|
||||
set(n, x, y)
|
||||
}
|
||||
if check2(img.At(x, y)) {
|
||||
set2(n, x, y)
|
||||
}
|
||||
}
|
||||
}
|
||||
wg.Done()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue