Because you're not capturing the output of the image? You're not sending the proper headers so the data is interpreted as an image of type "image/png"? You're not using the returned image identifier inside of an imagepng() function call?
Those are all reasons you can't see the output of the image.