···8686 // Calculate position to center the head on top of the body
8787 // Place head in upper portion of the image
8888 headX := (bodyBounds.Dx() - newHeadWidth) / 2
8989- headY := bodyBounds.Dy()/8 - newHeadHeight/2 + 1900 // the 1900 is to line up with my head
8989+ headY := bodyBounds.Dy()/8 - newHeadHeight/2 + 350 // the 1900 is to line up with my head
90909191 headPos := image.Rect(headX, headY, headX+newHeadWidth, headY+newHeadHeight)
9292···9797}
98989999func main() {
100100- pumpkin, err := NewPumpkinHead("base_images/pumpkin_body.jpg", "base_images/pumpkin_head.png", "bighead")
100100+ pumpkin, err := NewPumpkinHead("base_images/pumpkin_body_cropped.jpg", "base_images/better_pumpkin_head.png", "bighead")
101101102102 if err != nil {
103103 writeErrorAndExit(err)
···107107 fmt.Println("==================")
108108109109 // Call the method 5 times to demonstrate
110110- for i := 0; i < 25; i++ {
110110+ for i := 0; i < 100; i++ {
111111 newPic, growingPains := pumpkin.GrowHead()
112112 if growingPains != nil {
113113 writeErrorAndExit(err)