aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-08-27 20:33:24 -0400
committerBen Burwell <ben@benburwell.com>2019-08-27 20:33:24 -0400
commit51c613d117309891666d01951899804b0a6cc7d0 (patch)
treeb155de9fb25294249594dccfbe9d692ca2c14cb6
parentcc94370fd1aa334e6511aaf6ccdc0c5e727367f3 (diff)
make bigger
-rw-r--r--main.go22
1 files changed, 14 insertions, 8 deletions
diff --git a/main.go b/main.go
index e2bd74b..c027a34 100644
--- a/main.go
+++ b/main.go
@@ -29,7 +29,7 @@ func main() {
}
seed := hash(*username)
- img := repeat(generateImage(seed))
+ img := makeBigger(repeat(generateImage(seed)))
str, err := encodeImage(img)
if err != nil {
fmt.Printf("%v\n", err)
@@ -92,10 +92,16 @@ func repeat(img image.Image) image.Image {
return newImg
}
-// func makeBigger(img image.Image) image.Image {
-// newImg := image.NewNRGBA(image.Rect(0, 0, 200, 200))
-// for x := 0; x < 10; x++ {
-// for y := 0; y < 10; y++ {
-// }
-// }
-// }
+func makeBigger(img image.Image) image.Image {
+ newImg := image.NewNRGBA(image.Rect(0, 0, 200, 200))
+ for x := 0; x < 10; x++ {
+ for y := 0; y < 10; y++ {
+ for i := 0; i < 20; i++ {
+ for j := 0; j < 20; j++ {
+ newImg.Set(x*20+i, y*20+j, img.At(x, y))
+ }
+ }
+ }
+ }
+ return newImg
+}