Graphics Tools for Linux
A manipulation tool that has gained a rather large following in a fairly short time is the GIMP, Generalized Image Manipulation Program. The GIMP is being developed primarily by Peter Mattis and Spencer Kimball at UC Berkeley. This tool, designed as a Unix-based counterpart to the Photoshop-caliber tools available on other operating systems, has a limited set of base features at this time; however, the design includes the ability to add plug-ins which expand the features of the program. The result of this design philosophy has been a very large collection of plug-ins from a growing developer base. I've added my own plug-in, the Sparkle plug-in based on John Beale's Sparkle utility. There are tutorials and tips and tricks web pages (see the Resources box) as well as a relatively strong effort to organize the registration, format and distribution of the plug-ins.
The GIMP provides both user interaction and the ability to combine images through various blending techniques (nearly all of which are done with plug-ins). By combining two images, say by subtracting one from the other, it is possible to take 2D black and white text and turn it into a full-color 3D image resembling anything from a plasma field to a glowing, tube-shaped jelly. The GIMP is a major step beyond the basic box, circle and fill capabilities of XPaint.
Combining images is done through what is known as “Channel Operations” (commonly referred to as channel ops). These are operations on individual pixels based on the intensities (brightness) or color of the pixel and/or surrounding pixels. In short, a channel operation is the blending of colors in one or more images. Channel ops are what make the GIMP a more attractive tool than XPaint to the graphics artist. (Note that the basic capabilities of XPaint are not all implemented in the GIMP, so XPaint is still useful.)
The disadvantages of the GIMP are twofold: it is in early development, and its GUI base is in the process of changing. The reliance on Motif is being removed and a new toolkit, gtk (the GIMP Toolkit), has been developed. This toolkit is in the early stages of testing. The base GIMP features and most of the plug-ins lack any detailed documentation. However, these problems are relatively minor and are being addressed. The GIMP's advantages are that, at this time, it is the only freely available program of this caliber, and it has a large support base from the plug-in development and user communities.
XV is another tool with wide audience appeal. XV, by John Bradley, is a shareware program that supports a large number of file formats for reading (displaying) and writing. A large printed document is available to those who register their copy of the software. Although the number of algorithms for manipulating images that XV supports is smaller than the plug-in base for the GIMP, the ability to control the images' colors is much greater in XV. You can control the hue, saturation and RGB (red, green and blue) levels interactively in more ways than the GIMP provides (although there is at least one GIMP plug-in that allows this control to some degree).
From my point of view, the main difference between the GIMP and XV is that the latter is designed for scientific image processing and the former for artists. I'm sure there are a few people who would argue, But I've seen television interviews of JPL and NASA employees who were using XV to display planetary images.
Figure 4. Image Produced Using GIMP Plug-ins
A couple of animation tools are worth mentioning. The first is mpeg_play, a tool for viewing MPEG-formated animation files. Its companion, mpeg_encode, creates MPEG files. It can also display XING files, which uses a variation of MPEG encoding. However, mpeg_play doesn't manipulate the image in a way that can be saved back to file—it modifies only the displayed image.
Xanim is similar to mpeg_play, but supports a much wider set of input file types and capabilities for resizing images on the fly.
One of the problems you'll encounter when working with graphics tools is support for specific image file formats. For example, while working with the GIMP, you may want to work with TGA images, since TGA provides as many as 24 bits of color while GIF formats only provide 8 bits of color. Having a greater range of colors gives a very smooth blending of colors when you add, subtract, blur or otherwise manipulate the images with the GIMP. However, if the image you are creating is destined for a web page, you need to convert it to GIF or JPEG format. If the GIMP didn't provide a way of doing this (which it does, but this is just an example), you would need a tool for converting the image formats.
PBMPlus and NetPBM are a set of tools for converting images between various formats. PBMPlus tools, originally written by Jef Poskanzer, take one image file of a particular format as input and convert it to an intermediate format called PPM (Portable Pixmap). Another PBMPlus tool is then used to convert the PPM format to the target format. For example, to go from TGA to GIF you might use
tgatoppm input.tga | ppmquant 256 | \ ppmtogif -interlace > output.gif
The ppmquant is another type of tool in PBMPlus used not to convert the file to another format, but to alter the image in the same way. In the case of ppmquant, the input image is quantified down from some large number of colors to 256. Doing so makes it possible to reduce the size of the data file, and depending on the image, may not alter the appearance so much as to make it unusable. You may choose to reduce the number of colors because computers can record more subtleties of color than the human eye can distinguish, and on a web page, small data files make for faster loading.
PBMPlus tools work by processing data from standard input and writing to standard output, which allows the user to string a collection of tools together in a series of pipes (as in the above example). All the tools are meant for command line use, i.e., no graphical interface is available for these tools.
NetPBM is a later incarnation of PBMPlus, after Jef stopped working on it and development was picked up by another team of developers. However, I believe Jef has once again returned to working on PBMPlus.
Another conversion tool is ImageMagick. This set of tools has a graphical front end, but they can also be used as command line tools, similar to the PBMPlus tools. I haven't used these tools much, but I know they have a number of supporters.
- Linux Kernel Testing and Debugging
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Wanted: Your Embedded Linux Projects
- Tails above the Rest, Part III
- Numerical Python
- RSS Feeds
- Dolphins in the NSA Dragnet
- The 101 Uses of OpenSSH: Part I
- Tech Tip: Really Simple HTTP Server with Python
- Tails above the Rest: the Installation