If I understand correctly, Gimp does
not let you save macros. It does
not let you save macros as keystrokes
that you type, save and immediately
repeat. At least, not at the time of
this writing.
It is something I sorely miss. The
only way to do macros in Gimp is to
use a full-fledged scripting facility
called Script-Fu.
Not that I'm complaining. I've used
Script-Fu in the past. It is wonderful.
It is far more powerful than the mere
ability to save keystrokes and turn
them into a macro.
Therein lies the problem. Sometimes I
need a lighter-weight way of saving keystrokes.
Sometimes Script-Fu is too much for me,
but a facility for gathering gimp keystrokes
and commands into one macro would be just
right.
This is more a problem of scale than anything
else. Scale the solution to the size of the
problem. In other words, don't make a big deal
about a little thing.
While I've not discovered a macro-saving capability
in Gimp, I have discovered a near-substitute. By
near-substitute, I mean something that will do for
now.
Tear-Off Menus
In Gimp there is something called a Tear-Off Menu.
It's a way to save a menu for later re-use. You tear
the menu off by clicking on the dashed line at the top
of the menu .
Tear-off menus are great. Instead of having to
go 3 menus deep to find a menu that you just
used a moment ago, you can save that menu by
tearing it off. Tear-off menus save a lot repeat
pointing and clicking.
The essence of my poor man's Gimp macro facility
is tear-off menus.
Here are a series of operations I did on a series
of images I was working on. First, I loaded the
images to Gimp in this manner. I typed the following
on the Linux command line:
gimp *jpg
The above command loaded 13 .jpg images into
Gimp. After loading the 13 images, I did the following
steps:
- Give each image an alpha channel
- Type Shift-O to select by color
- Click on the black background of
the image with the intent of turning
the black background into a transparency - Hit the delete key on my keyboard
to remove the black background - Apply the unsharp mask to the image
to sharpen up the image and reduce the
number of colors - Save the image by the same name but
with a .gif file extension instead
of a .jpg file extension
Since the images were line diagrams that
had been shrunk to fit into a smaller space,
the unsharp mask did wonders! It not only
made the line drawings appear to be cleaner
and clearer, it also reduced the number of
colors dramatically. In some cases the number
of colors went from over 1,000 colors to 7
colors.
Gif Versus Jpeg
Since I only needed 7 colors, I was better
off with a .gif than a .jpg. Jpegs
are great for representing lots of colors,
say, in a photograph, for example. Gifs are
great for line drawings that really don't
benefit from the overuse of color.
An additional benefit of the Gif format is that
you can turn the image into a transparency. Thus
you can remove the background of the image and
then layer the image on top of another image. In
my case, this got rid of ugly black-background
corners that would otherwise have appeared in the
topmost image in the image stack.
In a sense, I was using Gif's ability to be
transparent to round-off corners.
The Poor Man's Gimp Macro
So how does the poor man's Gimp macro
work? Basically, you save the tear-off
menus and place them on your screen in
a fixed order. For example, place them
on the right-hand side of your screen going
top to bottom.
If the tear-off menus belong on the right
side of the screen, then the image that has
the current focus belongs on the left side of
the screen. If the current focus image is
blocking the tear-off menus on the right,
drag the focus image to the left. In other
words, put the image you are working on the
left side of your screen to reveal the tear-off
menus that you have organized from top to bottom
on the right side of your screen.
By segregating the images that you are working
on from the tear-off menus you use to manipulate
these images, you are ready to start using the
poor man's Gimp macro.
The next step is fairly obvious. At least, it
is obvious if you have it right in front of you
on your screen. You manipulate the image by
applying each tear-off menu, one after the other,
from top to bottom.
That's the poor man's Gimp macro. That's it in
a nutshell. All it really is is traversing tear-off
menus in an established order.
Not as good a real macro facility, but it will do
for now.
The thing it saves me from doing is having to start
writing something in Script-Fu before I'm ready to
do so. In others words, its nice to work a procedure
out manually before turning it into a script.
Many many activities are not repetitious enough to
justify writing a script. Some things you are only
going to done maybe once a year, maybe less.
For something like this, something that is mildly
repetitious, the poor man's macro may fill the gap
nicely.
In Gimp, I feel there is a gap. There's a gap between
having to grind something out by pointing and clicking
too much and using Script-Fu.
I use the poor man's Gimp Macro to fill that gap.
That said, I'd like to acknowledge that there's nothing
quite like Gimp out there. It's easy to think of ways
to improve something when it is great already. Gimp is
a great thing.
Ed Abbott
No comments:
Post a Comment