Sujet : Re: Image background
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tclDate : 17. Oct 2024, 20:35:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <verotb$2sk50$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
saito <
saitology9@gmail.com> wrote:
I wonder if it is possible to remove the background from an image and
make it transparent using Tk or a package? Then I can save it as a png
image. The background in my case consists of a single color. Perhaps I
could replace that color with an "alpha" color but how?
man n photo:
imageName transparency subcommand ?arg arg ...?
Allows examination and manipulation of the transparency
information in the photo image. Several subcommands are
available:
imageName transparency get x y
Returns a boolean indicating if the pixel at (x,y) is
transparent.
imageName transparency set x y boolean
Makes the pixel at (x,y) transparent if boolean is true,
and makes that pixel opaque otherwise.