Re: Perl-fu - transparent colour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2000 at 03:48:14PM +0530, Gunjan Kapoor <gkapoor@xxxxxxxx> wrote:
> colour for the entire image. Is that possible with Perl-fu. e.g: specify
> white as the transparent colour.

What do you want to do? Do you want to replace white by transparency? This
is easy (not only in perl-fu, btw), just use plug_in_colortoalpha, e.g.:

$layer->colortoalpha(WHITE);

If you just want to replace a specific colour index (e.g. in an indexed
image) you can also use select_by_color and selection_clear.

> I've tried adding an alpha channel programmatically but perhaps did not
> know the proper procedure and the desired results were not achieved.

This usually suffices: "$layer->add_alpha".

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@xxxxxxxxxxxxx |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux