Several idioms have evolved on the Web that are worth examining in depth; the phenomenon of web counters, for example, or the culture of web cams. This chapter provides some reusable examples of common web graphics applications:
The BrokenImage module that enables Perl-based CGI scripts that generate graphics to present error messages to a web browser rather than a generic broken image icon.
A web page access counter that will be updated every time a user views the page. Even though some people rail against counters, they are still a much asked-for feature by new web authors.
A Web Cam how-to.
A section on providing ASCII ALT attributes so that your images may be viewed in some approximation by text-only browsers.
Thumbnailing scripts that will ease the tedium of making thumbnails of large groups of images.
Each recipe is broken down into three sections: a discussion of the problem, what is required for the example, and a discussion of a possible solution or implementation.
A web page that accesses a dynamically
generated image runs the risk of displaying uninformative
“broken” images if the script that generates the image
fails to successfully complete its operation. The fact that an
SRC attribute expects a valid stream of image headers and data can make it ...