- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for translucent (0.12 sec)
-
src/image/png/writer_test.go
img := image.NewRGBA(image.Rect(0, 0, width, height)) for y := 0; y < height; y++ { for x := 0; x < width; x++ { percent := (x + y) % 100 switch { case percent < 10: // 10% of pixels are translucent (have alpha >0 and <255) img.Set(x, y, color.NRGBA{uint8(x), uint8(y), uint8(x * y), uint8(percent)}) case percent < 40: // 30% of pixels are transparent (have alpha == 0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 14 08:14:05 UTC 2022 - 8.9K bytes - Viewed (0)