Linux Inside: Graphics Galore
by Gene Wilburn
(The Computer Paper, December 1999. Copyright © Wilburn Communications Ltd. All rights reserved)
If I told you that Linux offered some graphics programs that are as good as those you'd find for a Macintosh or Windows PC, you might wonder what I've been eating for breakfast. Well, fasten your seat belt. We're going to take a quick drive-by look at some packages that might surprise you. There are some impressive graphics programs available for Linux and, being open source, they're free and getting better with each release.
The poster child of open-source graphics programs is the GIMP, the short name for the GNU Image Manipulation Program. The GIMP is a sophisticated and powerful program that is frequently compared to Adobe Photoshop. It offers layers, colour channels, transformation tools, "intelligent" scissors, blending modes, masking, filters, text effects, plug-ins, and its own scripting language called Script-Fu. Oh yeah, and it does screen captures.
The GIMP is being used to create WWW graphics, retouch digital photos, create desktop wallpaper, assemble graphic montages, design magazine cover art--in short, to do just about anything you might do with a raster-based product like Adobe Photoshop. It can work with scanned images, digital camera shots, and a very large number of imported graphics formats. The GIMP's export capabilities are excellent.
The history of the GIMP is a typical open-source story. When the original authors, Spencer Kimball and Peter Mattis, were undergraduates at the University of California at Berkeley, they decided to create a Photoshop-like tool as a class project. The GIMP project was born, and before long the project attracted many developers, worldwide, who joined in its creation, extending its capabilities. Work progressed slowly but word spread quickly and the GIMP was being used extensively before it ever reached release 1.0. At the time of this writing, the current release is 1.04.
Although Linux itself can run on remarkably low-horsepower PCs, running the GIMP on Linux is like running any graphics package on any platform. The more memory, hard disk and processor speed you have, the better. Even so, the GIMP's intelligent use of memory makes it possible to run it even on machines with limited memory resources. It uses tile-based memory management, which swaps out portions of an image to hard disk when memory is insufficient.
The GIMP benefits from top-notch video cards. For any serious work, a good 4Mb card, capable of displaying 1152x900 with 16-bit colour, is the minimum. The more video memory you have, the better it performs. The GIMP does not directly support scanners or digital cameras, but Linux has drivers for a number of these devices, providing a means of capturing images for use with the GIMP.
The GIMP website (www.gimp.org) provides the following summary feature list:
- Full suite of painting tools including Brush, Pencil, Airbrush, Clone, etc.
- Tile based memory management so image size is limited only by available disk space.
- Sub-pixel sampling for all paint tools for high quality anti-aliasing
- Full alpha channel support
- Layers and channels
- A Procedural Database for calling internal GIMP functions from external programs as in
- Advanced scripting capabilities
- Multiple Undo/Redo (limited only by diskspace)
- Virtually unlimited number of images open at one time
- Extremely powerful gradient editor and blend tool.
- Load and save animations in a convenient frame-as-layer format.
- Transformation tools including rotate, scale, shear and flip.
- File formats supported include gif, jpg, png, xpm, tiff, tga, mpeg, ps, pdf, pcx, bmp, and many others.
- Load, display, convert, save to many file formats.
- Selection tools including rectangle, ellipse, free, fuzzy, bezier and intelligent.
- Plug-ins which allow for the easy addition of new file formats and new effect filters.
- Over 100 plugins already available.
- Supports custom brushes and patterns
This feature set may not be something you'd expect from a free program. The GIMP has given some users the very reason they needed to run Linux in the first place. If bezier curves interest you more than Perl programming, this is a product you should take for a test drive. The GIMP is included as an option on every Linux distribution CD, and can also be downloaded directly from the GIMP website.
Before the GIMP came along, the workhorse for Linux graphics was ImageMagick, a collection of robust tools and libraries to read, write, and manipulate an image in any of the more popular image formats including GIF, JPEG, PNG, PDF, and Photo CD. ImageMagick is still widely used.
Because some of the tools can be invoked from the command line (and hence from scripts), ImageMagick lets you can create GIFs dynamically, making it suitable for Web applications. The ImageMagick website (www.wizards.dupont.com/cristy/ImageMagick.html) list the following highlights of the toolkit:
- Convert an image from one format to another (e.g. TIFF to JPEG)
- Resize, rotate, sharpen, color reduce, or add special effects to an image
- Create a montage of image thumbnails
- Create a transparent image suitable for use on the Web
- Turn a group of images into a GIF animation sequence
- Create a composite image by combining several separate images
- Draw shapes or text on an image
- Decorate an image with a border or frame
- Describe the format and characteristics of an image
Another set of graphical workhorses are the "ghost" utilities: Ghostscript, Ghostview and GSView. These interpreters for the Postscript language can be used to view and to format Postscript files. Because of their quiet versatility, they are often used on the printer side in Linux, allowing users to print Postscript documents even when they don't have a Postscript printer. Ghostview can view Postscript documents and selectively print pages from them. The "Ghost" website (www.cs.wisc.edu/~ghost/) provides additional information. The ghost utilities are often installed by default in Linux distributions.
A useful, if simple, vector-drawing tool is xfig, the Facility for Interactive Generation of figures under X11. Often used in conjunction with TeX and LaTeX, this program is capable of outputting its drawings in a large number of formats, including LaTeX box and picture formats, HPGL, Encapsulated PostScript, PostScript, PIC, ACAD, PCX, PNG, GIF, JPEG, TIFF, TK, PPM (portable pixmap) and XPM (X11 Pixmap). By default, xfig is not installed by most Linux distributions, but it is usually included on the distro CD. It can also be downloaded from the ftp.x.org/contrib/applications/drawing_tools/ directory.
A longtime open-source favourite for those who want to venture into the complex and exciting world of 3D graphics and animation is POV-Ray (Persistence of Vision Ray Tracing Program). Originally authored by a group of developers on a CompuServe forum, POV-Ray is available for a broad range of platforms.
POV-Ray has been enhanced with dozens of add-ons and companion programs, and the folks who use it stage Internet imaging contests to stimulate creative artwork. A visit to the POV-Ray home page (www.povray.org) will lead you to numerous tutorials, galleries and links to other 3D packages.
POV-Ray is one of those hack-it-together toolsets much beloved by hobbyists. It takes study and patience, but the payoff is significant and the price is right.
Need a 2D CAD tool. Try out QCad, an newly released program that is free for non-commercial use. This program is based on the Qt libraries (used for creating KDE), and it reads and saves in DXF format (used by AutoCAD). Available at www2.active.ch/~ribbon/qcad.html, QCad may be just the 2D design tool you're looking for.
(Note: since the time of writing, QCad has been released as GPL.)
One of the biggest Linux stories of the year was SGI's decision to embrace Linux for its Intel series of SGI workstations. SGI boxes are among the premier 3D workstations, used heavily by animators in the graphics industry in places like Hollywood. SGI has also committed to giving some interesting technology back to the Linux development community, including its XFS journalling filesystem. Look for some heavyweight animation software to run on SGI Linux.
At the LinuxWorld show in San Diego last August, Global Information Group (GIG) demonstrated GIG3DGO, a 3D solid modeling, animation and rendering system developed specifically for Linux. According to the company, "the GIG product line, which also includes GIGVIZ; a truly photorealistic visualization tool for CAD users, provides an easy-to-use and fully featured 3D graphics tool set for LINUX users to produce stunningly realistic imagery based on GIG's Constructive Solid Geometry (CSG) modeller and fast raytrace renderer. GIGVIZ enhances compatibility of its Linux version with a comprehensive set of dedicated converters, allowing the user to import geometry models from AutoCAD, 3D-Studio, Pro|Engineer, Varimetrix, Wavefront and many other packages into GIG for visualisation and rendering."
There's a real sense of momentum with Linux graphics, and the story is only beginning. If graphics grab your fancy, stay tuned with the Linux world. A lot of exciting graphics things are happening.
Sidebar: Book Review
Running Linux, 3rd Edition
One of the great books on Linux has been Matt Welsh's Running Linux, O'Reilly & Associates. Matt Welsh was the founder of the Linux Documentation Project in 1993 and a pioneer Linux documentation writer, authoring several early Linux HOWTO's.
Running Linux, based on Welsh's "Linux Installation and Getting Started Guide", was co-authored by Lar Kaufman. The 2nd edition was released in 1996--Internet light years ago.
For a long time, this was THE book you could recommend to anyone starting out. It presents a comprehensive overview of the Linux operating system, from history and philosophy to nuts-and-bolts issues. The problem with the book was simply that it lay fallow for too long. The rapid pace of Linux development torpedoed it into obsolescence. Everything it said was still valid, on one level, but terribly out of date with the tools people were actually using.
Thankfully O'Reilly has just released a brand new 3rd edition of Running Linux, updated by a third author, Matthias Kalle Dalheimer.
Running Linux, 3rd Edition, O'Reilly (ISBN 1-56592-469-X; $51.95 Cdn) is a recommended purchase for new users. It won't answer every question you have, but it will give you the best overview, without talking down to you, of any beginning book on Linux.
The updated edition includes new chapters on programs such as KDE and SAMBA. Hardware references and distribution references have been brought up to date. There are new sections on PPP connections and Java programming. The book, as before, makes frequent references to HOWTOs and primary websites for additional information, making it a very open-ended guide.
Best of all, the style of the previous editions has been preserved. Running Linux has a conversational tone that draws you in and hooks you completely. You feel you are communicating with an intelligent peer--something that is subtly reinforced through O'Reilly's old-fashioned and beautiful typesetting.
With the release of the 3rd edition, Running Linux has regained its place as the best overall beginner's book on the market. Intermediate users may also find much to appreciate inside the covers. Advanced users can safely pass it up, but may want a copy anyway simply to enjoy the lucid, engaging writing.
Running Linux is already on the shelves of major bookstores. Just double-check to make sure you get the 3rd edition, not a left-over 2nd. Happy reading!
Gene Wilburn (firstname.lastname@example.org) is a Toronto-based IT manager, musician and writer who operates a small farm of Linux servers.