Angelo wrote:
> Is it possible to convert a RGB image (png, tga or gif
image) to RGBA
> with PIL, and how to do that ? . With im.convert(mode,
matrix) ? .
the alpha layer controls transparency, and doesn't have any
direct
relation to the RGB values. to add an alpha layer to an
image, you can
use a direct convert:
imOut = im.convert("RGBA") # sets alpha to 255
if you have an RGB image, you can also modify it in place
im.putalpha(value) # set alpha to given value
or
im.putalpha(matte) # where matte is a mode "L"
image
</F>
_______________________________________________
Image-SIG maillist - Image-SIG python.org
htt
p://mail.python.org/mailman/listinfo/image-sig
|