Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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 (http://www.gimp.org) 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


In reply to Graphics Programming with Perl by cmilfo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found