Hi, it's difficult to help without knowing what actual code you are using. That output looks like an actual PNG type image, which is perfectly legal for GD. I can only guess that your cgi script is not outputting the correct HTTP headers to tell the browser that the data is a PNG.
Please post your actual code, then we can help.
C.