Quote Originally Posted by Wiering View Post

Bitmap transparency doesn't seem to work properly in Lazarus (or very different from Delphi at least). At first I thought it didn't work at all (posted an issue here
http://bugs.freepascal.org/view.php?id=31556 ), but now I see that it does work if you set up the transparent color first. However, once you draw the bitmap onto something else, it forgets its transparent color, but somehow does keep a mask of the transparency you had before. In Delphi, you can just set the transparent color at any time and it will draw the image accordingly.

(...)

[Edit] I found a workaround by adding Bitmap.Mask() before every Draw, which is probably very inefficient, but now the maps are rendered correctly.
That may explain the erratic behaviour I had. Some times it works, some times it doesn't...