Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Graphics Programming with Perl

by cmilfo (Hermit)
on Aug 16, 2002 at 02:05 UTC ( #190576=bookreview: print w/replies, xml ) Need Help??
Order Graphics Programming with Perl

Item Description: A Perl programmers introduction to Perl's graphics modules/tools

Review Synopsis: This is an excellent book for the Perl programmer getting started with graphics programming.

Graphics Programming with Perl

Graphics Programming with Perl was written to be "a guide to the graphics and imaging modules and tools available to the Perl programmer." Martien Verbruggen, author of GD::Graph and GD::Text modules, has met this goal head on by providing a very clear and concise look at many of the popular modules for creating and manipulating graphics with Perl.

The title of the book gives away its purpose but can be a bit misleading. The goal of the book is not to be a complete reference but more of a starting point for those new to graphics programming with Perl. This is not a book from which to learn Perl or graphics theory. This is a book to introduce graphics manipulation from a Perl point of view.

"Graphics Programming with Perl" is divided into four parts: Foundations, Creating Graphics, Special Topics, and the Appendices.

In part one, Foundations, Verbruggen reviews the fundamentals of graphics programming, discusses the common graphics file formats, and previews the modules and tools that will be discussed later in the book. Example code first shows up in Chapter 2 during a discussion of image sizes and formats. I found the modules and tools preview in Chapter 3 very useful as it will save time searching through the book at a later date. Part one offers a wonderful introduction to graphics for the beginning graphics programmer.

Part two focuses on the creation of graphics: drawings, charts or graphs, and three-dimensional images. GD and Image::Magick are used extensively in this section of the book. Verbruggen has offered many real-world examples, including thumbnails, charts, web photo albums, and simple animations. Although the GIMP is not discussed in full detail, the author makes reference to the GIMP ( and offers an example of creating an animation. Several links are offered for further study. Part two parades some of the many topics concerning creation of graphics with Perl. One of the topics I would like to have seen discussed more in part two is SVG (Scalable Vector Graphics). SVG is mentioned several times in the book; however, no examples are offered.

Part three is an interesting collection of topics, writing graphics modules, text placement, and pixel manipulation and transparency. Chapter 10, Writing Your Own Graphics Module, points out advantages of OO within graphics programming. Being that Verbruggen authored the GD::Text modules, Chapter 11, Controlling Text Placement, is handled very well. Chapter 12 cooks up a stew of topics, including pixels, PDL (Perl Data Language), and even processing in C.

I enjoyed reading Graphics Programming with Perl. The author handled a large set of topics very well, focusing on key points and discussing pitfalls that might be encountered when using the different tools. For instance, Verbruggen's experience shines through when he mentions the API changes to the modules and tools being discussed. The code examples are great (I especially enjoyed the bullets labeling the code), though it seems some of the examples are broken due to the afore mentioned API changes. The author does a wonderful job of providing references to other works, online documents, and module documentation. Two topics I think deserve more coverage are SVG and PDL, possibly in a second edition. I recommend this book to anyone who has experience with Perl and is just getting started with graphics programming.

Casey Milford
Conway Perl Mongers

Edit by tye

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: bookreview [id://190576]
[stevieb]: ...from an I2C master. It's ugly and there are many changes I'm going to make, but I had not done anything like it before. It's designed for my RPi:: automated test platform; a system that does CI on *all* my RPi modules.
[shmem]: pseudo chip?
[stevieb]: well, what happens is the Arduino 'listens' for requests r/w, and does the appropriate thing when it's interrupted based on the 'register' address sent in. It's ugly as it was my first attempt, but I've got great new ideas I'm just sitting.
[stevieb]: ...down to implement now. Here's the sketch as it currently sits
[shmem]: well I use I2C and SPI and stuff, but creating a pseudo chip looks to me like lot of indirection and memory clutter... not?
[choroba]: Are you going to use the device soon? Related to your comment about "not having much time to do a lot of coding"...
[stevieb]: sure, but I'm just learning ;) I consider it practice to get a good understanding of what goes on *after* an I2C/SPI request is made
[shmem]: ah ok. Gonna read that. but now....
shmem compiles himself into his template
[stevieb]: this is my RPi:: distribution overall automation build system physical layout. It doesn't encompass all of my RPi dists yet, ...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-06-25 22:42 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (572 votes). Check out past polls.