On Thu, 2008-07-24 at 11:49 -0700, Nerius Landys wrote:
> Hello.  I have a TGA image that is fully opaque.  I want to introduce
> translucency to the image, making each pixel translucent according to
> how far away from black it is.  If a pixel is originally black, it
> becomes fully opaque.  If a pixel is originally white, it becomes
> fully transparent.  If a pixel is 0x7f7f7f (gray) or 0xff007f
> (approximately halfway in brighness between dark and light), it
> becomes somewhere around half transparent (computed using diagonal of
> color cube).
> Is there an easy way to do this in GIMP?

Easy. Just add a layer mask. In the dialog for creating the mask, choose
to initialize the mask with "Grayscale copy of layer". Now you already
got almost what you want. You just need to invert the mask as you want
white to be transparent and black to be opaque. Colors->Invert will do
this. Now all you need to do is to apply the layer mask.


Gimp-user mailing list

Reply via email to