Helpful Suggestions
- Suppose that the picture that you wanted to make transparent didn't
have a uniform background color. In otherwords, the area that you
want to make transparent is cluttered up with a lot of stuff drawn in
different colors. This can easily be the case for pictures that have
been scanned in. I guess you could make each and every one of the
colors in the background transparent, but what happens if the actual
image that you want to see contains the same colors as the background?
- Make a backup copy of your picture because what I'm about to
explain is not a robust error proof technique. I've had xpaint (the
program I'm about to explain) severly chew up and vomit some of my pictures.
- To get around this problem of many colors in the background of
our picture, we can use a picture editor such as xpaint.
To get this running, type setup xpaint (if you've never set it up
before) and then type xpaint &. I haven't been able to get this
to run on the SUNs, but it works on the IBMs. I haven't tried it on the
SGI machines yet - so this is another experiment. Xpaint is simple
and very
intuitive to use. You can use the brush to paint over the background
pixels to make then all one color (make sure that the color you choose
is not in the actualy image that you want to display). You can pull
down fat bits from the image menu once you've loaded up a
picture to do tedious pixel editing.
- Once you've edited the picture, look at it again with Xv
and note the RGB color of the pixels that you want to make transparent
and then just run giftool on it again.
- This may sound like a tedious way of doing things, but this is
what I do. I have done this process many times to get the images on
my home page look decent.
- These techniques work fine if the picture format is a GIF. But if
it is not a GIF, then you have to convert it to a different file format.
Xv does this for you. If you load up a GIF or any picture
using Xv and then save it, you will be given many options of
file types that you can save to. So, if you have a JPG (sometimes JPEG)
that you want to work with, load it up in Xv then save it as
a GIF file.