D. R. Evans writes:
> I have a simple PNG image, and I'd like to change the top half so that at
> the very top the image is completely transparent, with the opacity
> increasing linearly so that halfway down the image (and all the way to the
> bottom) the image has 100% opacity.
> I've messed with layers and gradients until I want to scream -- I can't
> find the trick that allows me to do this. (It seems like it should be dead
> easy.)
> Could someone please point me toward something that describes how to do this?

- Make a layer mask (Layer->Mask->Add Layer Mask..., or you can use
  the context menu in the Layers dialog). Let it default to White
  (full opacity).

- Click on the gradient (blend) tool in the Toolbox.
  Make sure your fg/bg colors are Black and White (the defaults)
  and that the gradient is FG to BG (the default).

- In the image window, hold the Ctrl key down, then mouse down anywhere
  along the very top of the image, and drag straight down (the Ctrl
  key will make it easy to stay exactly vertical) to the middle of
  the image, then release the mouse button.

You're basically done (it should be transparent just as you
described), but you'll probably want one more step:

- In the Layers dialog, click on the tiny preview that shows your
  image, to make sure that it and not the layer mask next to it is
  active. You want the image preview to be outlined in white, and
  the mask preview to be outlined in black, not vice versa.
  (This saves you from getting "You are about to save a layer mask"
  errors when you save.)

If you save it as anything but .xcf, you'll probably get warnings
about how layer masks aren't preserved, but don't worry about those.
If you don't want to see them you can Flatten before you save.

Gimp-user mailing list

Reply via email to