[Gambas-user] How do I replace Image transparent background with a white background?

RICHARD WALKER richard.j.walker at ...247...
Sun Sep 16 22:26:01 CEST 2012


Success. Thank you William. #

It was the Color.Transparent that did not work. From reading the docs
it says that this constant has a value of -1. My black screen
(inverted Alpha, but don't ask me what that means) has pixels with the
value &HFF000000. So your fix works when I write it like this

$hImage = $hImage.Replace(&HFF000000, Color.White)

Thankfully that is accurate enough for my purposes. Obviously it would
fail for anything other than a completely transparent area.

Wouldn't it be cool to have a way to handle partially transparent
colours too? Something like your usage looks like it SHOULD do it - ah
well...

Richard




More information about the User mailing list