Brighten Sprite?

BlitzMax Forums/BlitzMax Programming/Brighten Sprite?

Grey Alien(Posted 2006) [#1]
Is it possible to draw a normal multi-coloured sprite as a pure white mask, or perhaps as a brighter sprite by a certain percentage (same with dimming too I guess). Also can this be done in colours like Red or Green etc. I'm sure this must be possible with one of the Blend Flags or something, I just need a hint :-)

Thanks in advance.


Dreamora(Posted 2006) [#2]
That is not possible with a simple command. You would need to convert the picture to pixmap and grayscale all pixels. From that point on you can draw it as bright image using the setblend lightblend or color it in any color you like.


Grey Alien(Posted 2006) [#3]
ouch.


Fetze(Posted 2006) [#4]
My suggestion is just to draw the Image twice. Once normal and another time with LIGHTBLEND right over the normal one. If you write a SetColor(b%, b%, b%) before the LIGHTBLEND-Image you can scale he brighten-effect.


Grey Alien(Posted 2006) [#5]
ok, so twice would brighten it by the amount I put in SetColour, and I could tint other colours it with that, thanks.