- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for GrayModel (0.23 sec)
-
src/image/draw/bench_test.go
src1.SetCMYK(x, y, color.CMYK{ uint8(13 * x % 0x100), uint8(11 * y % 0x100), uint8((11*x + 13*y) % 0x100), uint8((31*x + 37*y) % 0x100), }) } } src = src1 case color.GrayModel: src1 := image.NewGray(image.Rect(0, 0, srcw, srch)) for y := 0; y < srch; y++ { for x := 0; x < srcw; x++ { src1.SetGray(x, y, color.Gray{ uint8((11*x + 13*y) % 0x100), }) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 18:07:05 UTC 2023 - 6.6K bytes - Viewed (0) -
src/image/color/color.go
NRGBAModel Model = ModelFunc(nrgbaModel) NRGBA64Model Model = ModelFunc(nrgba64Model) AlphaModel Model = ModelFunc(alphaModel) Alpha16Model Model = ModelFunc(alpha16Model) GrayModel Model = ModelFunc(grayModel) Gray16Model Model = ModelFunc(gray16Model) ) func rgbaModel(c Color) Color { if _, ok := c.(RGBA); ok { return c } r, g, b, a := c.RGBA()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:45 UTC 2023 - 8.3K bytes - Viewed (0) -
src/image/png/example_test.go
log.Fatal(err) } levels := []string{" ", "░", "▒", "▓", "█"} for y := img.Bounds().Min.Y; y < img.Bounds().Max.Y; y++ { for x := img.Bounds().Min.X; x < img.Bounds().Max.X; x++ { c := color.GrayModel.Convert(img.At(x, y)).(color.Gray) level := c.Y / 51 // 51 * 5 = 255 if level == 5 { level-- } fmt.Print(levels[level]) } fmt.Print("\n") } } func ExampleEncode() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 21 19:47:04 UTC 2016 - 3.6K bytes - Viewed (0)