Review: Programming Web Graphics with Perl & GNU Software 20
Programming Web Graphics with Perl & GNU Software | |
author | Shawn P. Wallace |
pages | 441 |
publisher | O'Reilly |
rating | 8/10 |
reviewer | chromatic |
ISBN | |
summary | If you want to spice up your website with graphics generated on the fly or automate graphic manipulation tasks with Perl, Shawn Wallace points you in the right direction and gives you the tools you'll need to hone your skills. |
The Scenario
You're an experienced webmaster looking for new ways to present information to your customers. Perhaps you want to create a graph showing hits per hour, or you need to convert all of your GIFs to PNGs, and you know that Perl would be perfect, if only there were a module somewhere.... Or maybe you'd like to write some Perl-Fu, but don't know how to start.
What's Bad?
The book seems a little short, for all of the topics presented. I'd have liked to see more examples, but there is a lot of ground to cover, and the references given at the end of each chapter provide places to go for more information.
What's Good?
General ImpressionsFor the most part, the information presented is platform-neutral. There is a slight Unix bias, but all of the examples should work with various web servers on most platforms with no modifications. It's also pragmatic -- though the HTML 4.0 specification is mentioned, the author recommends HTML 3.2 until more browsers comply with the 4.0 specification.
The code is very clean and well-commented. Intermediate Perl programmers should have no difficulty following along.
The GIMP is covered thoroughly, with a chapter describing normal operation and basic Perl-Fu, and two Appendixes, a Quick Reference Guide and a Procedure Reference Guide. (Very handy!)
Each chapter lists a handful of references for more information. Think of this book as an introduction to the subjects, and a reference guide after you have the basics down.
Section by Section
Intro to Web GraphicsChapter one, Image File Formats, delves into the three most popular graphics formats used on the web today: GIF, JPEG, and PNG, describing file formats, color options, transparency, animation, and the like. There's a section describing which format is appropriate for which usage, and a small discussion of the LZW patent issue.
Chapter two, Serving Graphics on the Web, looks at the web server and web browser, and their roles in serving and displaying images. This chapter is a kind of overview of the rest of the book, with simple CGI and HTML examples peppering the technical description.
Chapter three, A Litany of Libraries, simply describes several useful free graphics libraries (several of which have their own chapters).
Graphics Programming ToolsThe meat of Programming Web Graphics is in this section. Each chapter focuses on one tool/library, discussing its strengths and giving real-world examples, the bulk of the material is a Nutshell-style listing of methods and data. Much of the book's value is here.
Chapter four, On-the-Fly Graphics with GD, looks at the GD module for standard, quick GIF manipulation.
Chapter five, Industrial-Strength Graphics Scripting with PerlMagick, discusses ImageMagick and PerlMagick, for more complicated (and, more likely, off-line) tasks.
Chapter six, Charts and Graphs with GIFgraph, talks about the GIFgraph module for creating graphs, pie charts, and so forth.
Chapter seven, Web Graphics with the Gimp, delves into the GIMP, with a brief introduction and tutorial. The focus is on two things: using the GIMP to create or to modify web graphics, and creating Perl plug-in scripts for the GIMP.
Dynamic Graphic TechniquesChapter eight, Image Maps, describes server and client side image maps. Example scripts build a "wander engine" (a sort of database-backed set of rooms, traversable with a web browser).
Chapter nine, Moving Pictures: Programming GIF Animation, focuses on the nitty gritty of GIF89a, and describes creating animations with PerlMagick and GIFScript.
Chapter ten, Web Graphics Cookbook, is a sort of catch-all for examples. It provides scripts for a broken image error graphic generator, a robust and secure access counter, JavaScript rollovers, a Web Cam discussion, creating ASCII ALT tags with AAlib, and making thumbnails easily.
Chapter eleven, Paperless Office? Not in Our Lives: Printing and the Web, describes the PostScript language in brief, and documents the PostScript module, paying attention to the GhostScript package.
AppendixesAppendix A, A Simple PNG Decoder in Perl, contains the source to the PNGObject module.
Appendix B, Quick Reference Guide to the Gimp, briefly describes the menus and dialogs of the Gimp.
Appendix C, Procedure Reference for the Gimp, documents the API to the GIMP's internal Procedural Database. Procedures are listed according to their functionality, such as managing images, or working with layers and channels.
So What's In It For Me?
If you're a moderately experienced Perl programmer with a web site to play with, and if you're interested in using Perl to make your graphics mastering much easier, pick up this book!
That's a pretty specific audience, but anyone else who has an interest in these things (especially the big three -- GD, PerlMagick, and Perl-Fu) will benefit from the specific chapters and the function references. It's an eclectic book, and there's a lot of information presented. The author has done a tremendous amount of research on lots of different subjects (Generate PostScript receipts from web forms? I never would have guessed), and this book has expanded my ideas of what is possible.
The cover animal is a collared titi, a small South American monkey.
Buy this book at Amazon.
Re:h0h0 (Score:1)
Re:General Comment (Score:1)
I'm sure there are some sub-par ones (I've never read any of the NT-related titles) but all the ORA books I've read/bought have been well worth the price.
Furrfu...
Re:General Comment (Score:1)
I loved your motif book. However, I still find Motif in general to be too much hassle... The other problem is that once I'd started looking into it, I found I needed a custom widget for my app. So I bought vol 3. Then, I found I needed to know more about Xlib than I thought to do that. So now I have to go and buy vol 1. I just hope I don't have to buy vol 0 at the end!!!
Just when you thought you had all the Perl books.. (Score:1)
I know where my check is going......
-VaxGeek
Re:Catcher in the Rye (Score:1)
I felt the same way when I picked up this one, actually. If you're ever in the Portland, Oregon area, stay away from Powell's Technical books.
Okay, go. Just be aware that you'll find lots of stuff to buy, and prices are pretty good. Then send Slashdot a couple of bucks. (Is that okay to say, Hemos?)
--
QDMerge [rmci.net] 0.21!
Catcher in the Rye (Score:2)
Perl Script that Draws a Camel. (Score:1)
Looks like a good book. (Score:1)
Only $17.97 on Amazon (Score:1)
--jeddz
Re:General Comment (Score:1)
Well, I can sympathize with the problem of not really needing the books, and yes, just about all the ORA books I've bought and read so far are good ones, but there are occasionally a few problems that seem to slip by the staff--what comes to mind right away is Advanced Perl Programming, which (in spite of being a conceptually great, and well-designed, tutorial) has some errors in references to code examples (and errors in code examples) and the like that just shouldn't have made it past a crack editorial staff.
*shrug* Chalk it up to deadlines, I guess...
Re:General Comment (Score:1)
> O'Reilly books can have any popularity
I don't know...I think the ORA book on Motif Programming is pretty good.