How serve graphic with CGI?

I’m not using PBuilder at all so that I can create proper validated XHTML web pages. So, I’m using pure CGI to assemble the HTML.

So far I’m just extending the HTTP CGI Server Sample to experiment. It does not include any example for handling images in a web page, and I don’t see how to integrate them.

Any hints? Thx.

You can reference with the HTML tag to any static image you want.

Do you want to create JPEG or GIF dynamically on the fly?

Another option for dynamic images is to (X)SVG:
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics
which is just an XML file which is rendered by the browser.
This is good for displaying charts, e.g.
You can write a CGI which is dynamically creating the XML content of such an image.