On 2005-11-20, Helmut Jarausch <email@example.com> wrote:
> I want to replace one part of image A (a head) with a very similar
> part of Image B. I've cut that part out of Image B and copied it
> into an additional layer to image A.
> Now, the hair of the two heads do not fit exactly. So I want
> to blend these two but only in a certain (small) region.
> How can I change the opacity only within a (small) part of
> a layer?
Add a layer mask (right click on the layer's thumnail on the layer tab) to
whichever layer you want to change. That will show up on the LAYERS tab as
another thumbnail. Add a white (opaque one). The active (mask or image
layer) will have a white border (click on one or the other thumbnail) (you
don't "see" the layer mask but you do immediately see the effects on the
visible layer - you can make the layer mask, as a gray scale image, visible
if you choose to show the layer mask). On the mask (with the mask selected -
but not visible) drawing with black makes the image transparent, with white
opaque, with gray partially transparent. You can make a selection using a
bezier curve for example and with the layer mask selected and fill with a
gradient, for example (white to black) to fade. If that looks about right,
but the rate at which it fades is wrong, with the layer mask selected, use
LAYER->colors->curves. There you can adjust the colors (and immediately see
how it affects things). You can apply the layer mask (which will transfer
the effect to the layer's alpha channel).
Other ways ... you can use the erase brush and set the percentage effect (to
give partial transparency) and not choose a hard edge. You can use a select
mask, quick mask, and working on the mask (not the layer image) draw - then
in the channel column right click on the mask and choose to make a selection
from the mask and then clear it (CTRL-K). When you "clear" a selected
region, it makes it trasparent (effects the alpha channel) based on the
selection - the selection is not just this and that pixel but the pixels are
chosen with a certain weight (a gray scale channel for a select mask, quick
mask) and clearing it only clears it by the amount you have selected so if
you have put a gradient in the quick mask, convert to selection and clear
that - you get a fade out. I prefer the layer mask as you see immediately
the effect (especially nice with I am adjusting the rate of fading by using
Gimp has many ways to affect the transparency of layers and how they blend
together (check the different options for the top layer such as lighten,
darken, normal, etc.).