Advertisement: Support LinuxWorld, click here!

LinuxWorld

March 1999
Tapping
the Source:
LinuxWorld
Expo news

 Navigate
   Home
   Topical index
   Archive

 Print this story
   Print-friendly version

 Subscribe
   Free e-mail alerts

 Search
   
   

 Contact Us
   Masthead
   Advertising Info
   Writer Guidelines
   Link to LinuxWorld

 What do you think?
   E-mail the editors

 

Advertisement

 Version Control

Photoshop for free

Monet in a plugin, Script-Fu; a look at some of the neat and notable features of the GNU Image Manipulation Program

Summary
Apache is nice, but on the desktop Joe Barr has no question about which Linux application deserves the title of Killer App. It's the GIMP. In this month's column, Joe discusses the powerful scripting and plugin features that make the GIMP so darned good. (1,800 words)
By Joe Barr

Thanks to everyone who responded to last month's column about moving full-time to a Linux desktop. Based on the feedback we received, I think it is fair to say there is tremendous interest not only in using Linux as a desktop platform, but in discussing what the ideal Linux desktop is or will be.

I admit to being a little overwhelmed by the feedback. I feel like a Linux newbie who asks for help in a newsgroup or mailing list and is astounded by the number of people who respond.

Corel's Word Perfect 8 was far and away the most popular Linux app mentioned. Intuit's Quicken -- and games in general -- showed up most often as the apps you need before you'll move to full-time Linux use. I was also corrected on the availability of a RealNetworks client for Linux. It's here today.

This month I want to take a look at what I see as the closest thing Linux has to a "killer app." Not the most popular app, but the one most likely to motivate users to switch OS platforms. In my mind, the handsdown winner in this category is the GNU Image Manipulation Program, aka the GIMP.

I won't attempt a primer on the GIMP. It's too complex and there are already a number of FAQs and how-tos dedicated to its installation and use. I'll focus instead on the basics: what it is, what it does, and what makes it such an attractive program to someone like me, with a need to create Web site images and graphics.

The closest thing to the GIMP in the DOS/Windows world is Adobe Photoshop. I used Photoshop a bit while maintaining a corporate Web site. Measuring expertise on a scale of 1 to 10, I am probably a 2 or a 3. Most of my Web site image work has been done using that fine shareware package, Paint Shop Pro. I mention this only to underscore the fact that I'm not a graphics expert; but that may make me a typical GIMP user.

Figure 1. The GIMP's toolbar

According to the GIMP home page, in addition to all the standard painting tools (brush, pencil, airbrush, selection tools, clone, etc.) the GIMP also provides unlimited image size, subpixel sampling, full alpha channel support, layers, channels, multiple undos and redos, unlimited number of open images, a gradient editor and blend tool, numerous transformation tools, custom brushes, support for most popular graphics formats, over a hundred plugins for special effects, and more.

The assassin's weapons
That list easily goes beyond the capabilities of Paint Shop Pro and puts the GIMP in the same class as Adobe Photoshop. Not a bad class to be in when you consider that we're talking about the premier commercial product available in its genre, and a software package that will run you over $500 on the street. But it's the "and more" part -- its procedural database and its amazing scripting capabilities -- that makes the GIMP an assassin. These features make the GIMP extensible and more powerful for the average user, and in this it's unique.

Unless you're a developer writing plugins or scripts for the GIMP, you probably won't deal directly with the procedural database. But you will very likely benefit from its existence, as it makes all the GIMP's internal functions available to plugins and scripts. It also tracks installed plugins and scripts so that as new ones are added their functionality becomes universally available as well. You can easily browse the database to see what's there by clicking Xtns on the toolbar and then choosing DB Browser.

Unleashing the Monet within
Visit the GIMP Plugin Registry (in Resources) to see a detailed description of what you can do with the GIMP's plugins. For one thing, plugins allow the artistically challenged to produce dramatic, well-crafted, artistic effects. For example, I used Vidar Madsen's GIMPressionist plugin to transform an ordinary digital snapshot of my granddaughter into something like a painting by Monet.

I downloaded the source from the GIMPressionist home page, ran make and make install, and GIMPressionist was ready to use the next time I started the GIMP.

After opening the original photo in jpg format, I right-clicked on it and chose Filters-Artistic-GIMPressionist. Voila. It was so easy to do that I tried a couple of the built-in plugins as well. In less than two minutes I had, in addition to the original photo, an impressionist, a cubist, and a mosaic version of the image. And that's the power of the GIMP.


Figure 2. From mosaic to Monet: the GIMP at work
(For a larger version of this image click here)

When you first start the GIMP, it displays the Startup splash screen while looking for plugins and extensions to load. On my system, that takes about four seconds. Then the splash screen disappears. If you want it, the Tip of the Day window will show up and stay open until you close it. Otherwise all you see on your X desktop is a small, deceptively simple tool bar with File and Xtns across the top bar.

Script-Fu
If you click on File you see all the usual options: New, Open, Preferences, About, and so on. But when you click on Xtns things get interesting in a hurry. There appear the DB Browser, Screen Shot, Web Browser, and the mysterious Script-Fu. Script-Fu? Yes, Grasshopper. Script-Fu.

Beyond the GIMP's own built-in functionality, beyond the plugins to achieve specific graphics effects and alterations, beyond the DB Browser -- which lets you search for routines and calls available to those plugins and to scripts written in one of the three supported scripting languages (Tcl, Scheme, and Perl) -- beyond all these tricks and tweaks is Script-Fu.

To borrow a phrase from Steve Martin, there are those who have a way with images, and there are those who no have way. I am one of those without way. What Script-Fu does is allow me to create special effects for images and text in a minute or two that I would probably never be able to otherwise create.

What Script-Fu does
is allow me to create
special effects for
images and text in a
minute or two that I
would probably never
be able to otherwise
create.

Scripts allow you to perform more detailed work than plugins. Usually plugins require that you have an open image to work on, while scripts often create the image and do the work.

For example, I timed myself while I created three logos for LinuxWorld using Script-Fu. It took me less than five minutes to try half a dozen different logo scripts and choose these three. All I had to do was replace the text string and font size in the dialog box that popped up when I ran the script.

Want something a little more animated? Create an image, or do as I did, cut and paste a copy of Tux (the Linux penguin) into an image. Then right-click to bring up the menu, choose Script-Fu-Animators-Spinning Globe, and go.

In a few seconds, your image will have been converted to a spinning globe. The one I made for my Web site says "DSP" on one side of the globe and "Tux" on the other.

For those with graphics skills, Script-Fu offers a way to automate tasks and avoid needless repetition. For a primer on getting started writing your own Script-Fu, see the tutorial Mike Terry's Black Belt School of Script-Fu. (In Resources.)

If you want to see what Script-Fu can do without going to all the bother of installing the GIMP, point your Java-enabled browser at cooltext.com. There you can use Net-Fu to generate logos, buttons, and bullets via the GIMP's engine. And of course you can use your browser to save and use those objects as you wish.

Validating the open source model
The GIMP was created by Spencer Kimball and Peter Mattis and licensed as free software under the GNU GPL. When Kimball and Mattis left college to begin their professional careers, they also left the GIMP behind for others to develop. Currently Manish Singh is the GIMP's lead developer.

The GIMP was at release 0.99.10 when its creators moved on. The stable release today stands at 1.0.2. The developer release is at 1.1. Except for a lot of under-the-covers work to make it more stable, the GIMP is very much as Kimball and Mattis left it.

I've read that some feel the "downtime" that occurred in development is a black-eye for the open and/or free source development model. I couldn't disagree more. I think the GIMP's easy transition from the hands of its creators to the current crew is testimony to the fact that the open source process works.

If you have a way with images and you've tried your skills with the GIMP -- or even if you're artistically impaired like me -- I'm interested in hearing what you like and don't like about it.So write me.

Discuss this article in the LinuxWorld forums (2  postings)
(Read our forums FAQ to learn more.)

About the author
Joe Barr Joe Barr is a software professional, writer, and self-proclaimed dweeb. He has been working in the industry since 1974 as a programmer, analyst, consultant, and manager. In 1994 he began writing a monthly column called Papa Joe's Dweebspeak Primer in Austin, TX's, Tech Connected magazine. The column exists today as an e-zine and newsletter at www.pjprimer.com, which has run on Linux since its inception.

 
Tell us what you
thought of this story

 Excellent
 Worth reading
 Not worth reading

 Not technical enough
 Just right
 Too technical

 More stories like this
 Don't cover this topic


Advertisement: Support LinuxWorld, click here!


Resources


(c) 1999 LinuxWorld, published by Web Publishing Inc.