Book description
From access counters and log-report graphs to scientific plots and on-the-fly animated GIFs, graphics scripting is within the grasp of most Web authors. It is a little documented field, however, and the many valuable free libraries and tools available on the Internet remain under-utilized. Programming Web Graphics with Perl & GNU Software is aimed at intermediate and advanced Web users who want to use CGI scripts to generate dynamic graphic content. It will also help to demystify the manipulation of graphics formats for newcomers to the Web. Programming Web Graphics with Perl & GNU Software takes a practical, resource-like approach to the content. It is not a book about design or aesthetics of Web graphics; its focus is on programming or, more accurately, scripting programs that manipulate graphics file to be published on the Web. Most of the examples in the book use Perl as a scripting language, though the concepts are applicable to any programming language. However, several powerful Perl modules for generating graphics (GD, PerlMagick, GIFgraph) should help position Perl as a major contender for your Web graphics applications. Most of the topics covered in the book are applicable to any platform (NT, Linux, Un*x, MaxOS), with the exception of the chapter detailing the Gnu Image Manipulation Program (a free Adobe Photoshop-like application), which requires a connection to an X server. The focus is always on free software, when it is available. This book covers the following:
a tour through the most popular Web graphics file formats by implementing parsers for GIF, JPEG, and PNG files
descriptions of the PNG, JPEG, and giflib libraries, as well as many other free and proprietary libraries and SDKs
extensive documentation and examples using the Perl graphics modules GD and GIFgraph, and the Perl interface to the powerful ImageMagick libraries
documentation on the Gnu Image Manipulation Program (GIMP) and the Perl interface that lets you easily script plug-ins or interface to the GIMP via the Web
the creation of image maps from data extracted from a database
the implementation of several new Perl modules for the creation of neatly formatted PostScript files
details on interfacing to a fax gateway
reusable recipes for many popular applications such as Web counters and Web cams
the creation of animated GIFs on-the-fly
One of the key ingredients to the success of the Web is that anyone who wanted to could participate in publishing to the world. This book will take its readers to the next level of publishing to the world: learning to use scripting programs to create dynamic graphics for their Web sited. The information in this book is written in a practical, easy manner with high-quality documentation and useful examples throughout. It is a detailed reference that provides Web designers and programmers and with the information they need to program.
Table of contents
-
Programming Web Graphics with Perl & GNU Software
- Preface
-
I. Introduction to Web Graphics
- 1. Image File Formats
- 2. Serving Graphics on the Web
-
3. A Litany of Libraries
-
Image Support Libraries
- AA-lib, an ASCII Art Library
- The Codes Library: A Free Compression Library
- The FreeType Project: A Free TrueType Font Engine
- gd: A GIF Manipulation Library
- Ghostscript: A Free PostScript Interpreter
- GIFLIB and libungif
- ImageMagick: An All-Purpose Image Manipulation Library
- The IPG’s JPEG Library
- NetPBM
- photopc
- libpng: PNG Image Format Support Library
- VFlib: A Font Rasterizer
- zlib: A Free Compression Library
- References
-
Image Support Libraries
-
II. Graphics Programming Tools
- 4. On-the-Fly Graphics with GD
-
5. Industrial-Strength Graphics Scripting with PerlMagick
- Learn PerlMagick in 21 Seconds
- The ImageMagick Distributionand PerlMagick
- Image::Magick Attributes and Methods by Category
- Reading and Writing Images
-
Getting and Setting Image::Magick Attributes
- adjoin
- background
- base_columns
- base_filename
- base_rows
- blue_primary
- bordercolor
- class
- colormap[i]
- colors
- colorspace
- columns
- comment
- compress
- delay
- density
- depth
- dispose
- dither
- file
- filename
- filesize
- filter
- font
- format
- gamma
- geometry
- green_primary
- height
- interlace
- iterations
- loop
- magick
- matte
- mean
- normalized_mean
- normalized_max
- packetsize
- packets
- page
- pen
- pixel
- pointsize
- quality
- red_primary
- rendering_intent
- rows
- signature
- size
- texture
- total_colors
- type
- units
- white_point
- width
- x_resolution
- y_resolution
-
Manipulating Images
- AddNoise( )
- Annotate( )
- Append( )
- Average( )
- Blur( )
- Border( )
- Charcoal( )
- Chop( )
- Clone( )
- Comment( )
- Composite( )
- Contrast( )
- Crop( )
- CycleColormap( )
- Despeckle( )
- Draw( )
- Edge( )
- Emboss( )
- Enhance( )
- Equalize( )
- Flip( )
- Flop( )
- Frame( )
- Gamma( )
- Implode( )
- Layer( )
- Label( )
- Magnify( )
- Map( )
- Minify( )
- Modulate( )
- Mogrify( )
- MogrifyRegion( )
- Montage( )
- Negate( )
- Normalize( )
- OilPaint( )
- Opaque( )
- Ping( )
- Quantize( )
- QueryColor( )
- Raise( )
- ReduceNoise( )
- Roll( )
- Rotate( )
- Sample( )
- Scale( )
- Segment( )
- Shade( )
- Sharpen( )
- Shear( )
- Signature( )
- Solarize( )
- Spread( )
- Swirl( )
- Texture( )
- Threshold( )
- Transform( )
- Transparent( )
- Trim( )
- Wave( )
- Zoom( )
- How to Tell When Something Has Gone Wrong
- Using the ImageMagick Utilities
- 6. Charts and Graphs with GIFgraph
-
7. Web Graphics with the Gimp
-
Quick Gimp
- Step 1. Open a New Document and Create a Background
- Step 2. Apply a Radial Gradient
- Step 3. Create a New Layer
- Step 4. Apply a Custom Gradient with Transparency
- Step 5. Merge the Layers
- Step 6. Apply Plug-In Filters to the Image
- Step 7. Apply an Animation Script
- Step 8. Save the Marble as an Animated GIF
- Getting and Installing the Gimp
- Using the Gimp for Day-to-Day Web Projects
- Scripting the Gimp in Perl
- References
-
Quick Gimp
-
III. Dynamic Graphic Techniques
- 8. Image Maps
- 9. Moving Pictures: Programming GIF Animation
- 10. Web Graphics Cookbook
- 11. Paperless Office? Not in Our Lives: Printing and the Web
- IV. Appendixes
- Index
- Colophon
Product information
- Title: Programming Web Graphics with Perl and GNU Softwar
- Author(s):
- Release date: February 1999
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781565924789
You might also like
book
Perl Graphics Programming
Graphics programmers aren't the only ones who need to be proficient with graphics. Web and applications …
article
Splitting Strings on Any of Multiple Delimiters
Build your knowledge of Python with this Shortcuts collection. Focusing on common problems involving text manipulation, …
article
Use Github Copilot for Prompt Engineering
Using GitHub Copilot can feel like magic. The tool automatically fills out entire blocks of code--but …
article
Reinventing the Organization for GenAI and LLMs
Previous technology breakthroughs did not upend organizational structure, but generative AI and LLMs will. We now …