in reply to Re^2: CGI display a gif
in thread CGI display a gif

The word "work" was missing. (I've just added it.) If you do <img src="http://localhost/cgi-bin/image.cgi">, you'll get a broken image since image.cgi returns HTML, yet your brower is expecting an image.