Programming with Perl, by Martien Verbruggenn, (Paperback,
328 pages); ISBN 1-930-11002-2
Publications Co., go
to the web site
to the site
is usually considered to be a scripting or text
processing language that programmers use to quickly
create a 'job' to suit business needs in the
UNIX world. Business processing jobs seldom require
any graphics capability, nor is the UNIX world
graphically oriented. This is probably why graphics
capability has been missing in the core Perl
package (except for the limited TK). Therefore,
it is interesting to see a book devoted to graphics
programming using Perl. O'Reilly published a
similar book three years ago. This new book from
Manning should provide more in-depth coverage
of the topic. I haven't read the O'Reilly book,
but, thanks to this book, I have come to know
about some useful tools.
1 (chapters 1 to 3) is about the basics of graphics programming
in Perl. The author starts the discussion by explaining colors,
by far the best explanation I've encountered in all the books
that I have ever read. The author goes into the discussion
of file formats and their inter-conversion. Chapter 3 is a
summary of modules available for Perl graphics.
2 (chapters 4 to 9) discusses the creation of graphics, including
drawing, charts, web graphics, animations for the web, image
resizing and 3D graphics. The chapter on web graphics has
an interesting application called Web Photo Album. The author
created it to store his daughter's photo album on the web.
To achieve the functionality, the author discusses the use
of XML files to maintain and parsing the index. I have been
interested in image resizing too and chapter 8 discusses how
this can be done with the ImageMagick package. I am happy
to find that this package supports multiple languages, including
Java and C++.
3D graphics topic is inevitably centered on the OpenGL library.
Here, the author discusses exceptions, not the norm, that
OpenGL C library can be translated into Perl. More importantly,
the author discusses how an image can be saved into a file
rather than being displayed on screen. The RenderMan library
is also briefly discussed for device-independent description
of 3D graphics.
3 (chapters 10 to 12) discusses three special topics: writing
your own module, text placement, pixel manipulation and transparency.
The reason you need to write your own module is that different
libraries have different functionality and interfaces. The
author exemplifies the need to write a customized interface
for GD and ImageMagick and create an Object-Oriented implementation
of a clock.
this book covers graphics programming in Perl in a logically
ordered and balanced manner. It doesn't provide all the details.
However, it triggers your imagination to search for more information
on the topics. That's exactly how a book should function.
The author has done a wonderful job. Chapters 1 and 4 are
downloadable from the book web site.
to the Editor are welcome and occasionally abused in public.
Send e-mail to: email@example.com