···86 // Calculate position to center the head on top of the body
87 // Place head in upper portion of the image
88 headX := (bodyBounds.Dx() - newHeadWidth) / 2
89- headY := bodyBounds.Dy()/8 - newHeadHeight/2 + 1900 // the 1900 is to line up with my head
9091 headPos := image.Rect(headX, headY, headX+newHeadWidth, headY+newHeadHeight)
92···97}
9899func main() {
100- pumpkin, err := NewPumpkinHead("base_images/pumpkin_body.jpg", "base_images/pumpkin_head.png", "bighead")
101102 if err != nil {
103 writeErrorAndExit(err)
···107 fmt.Println("==================")
108109 // Call the method 5 times to demonstrate
110- for i := 0; i < 25; i++ {
111 newPic, growingPains := pumpkin.GrowHead()
112 if growingPains != nil {
113 writeErrorAndExit(err)
···86 // Calculate position to center the head on top of the body
87 // Place head in upper portion of the image
88 headX := (bodyBounds.Dx() - newHeadWidth) / 2
89+ headY := bodyBounds.Dy()/8 - newHeadHeight/2 + 350 // the 1900 is to line up with my head
9091 headPos := image.Rect(headX, headY, headX+newHeadWidth, headY+newHeadHeight)
92···97}
9899func main() {
100+ pumpkin, err := NewPumpkinHead("base_images/pumpkin_body_cropped.jpg", "base_images/better_pumpkin_head.png", "bighead")
101102 if err != nil {
103 writeErrorAndExit(err)
···107 fmt.Println("==================")
108109 // Call the method 5 times to demonstrate
110+ for i := 0; i < 100; i++ {
111 newPic, growingPains := pumpkin.GrowHead()
112 if growingPains != nil {
113 writeErrorAndExit(err)