Help: ALPHAMODE -.999 is not explained

Previous topic - Next topic

kaotiklabs


ALPHAMODE -.999 for png alpha support is not documented.
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

MikeHart

Is it much different from a -1.0 value?

Moru

Should be fine as long as it's not 0. But yes it's missing in the documentation.

Kitty Hello

Uhm, that's obvious, no? ALPHAMODE 0 -> no blending. Thus only alpha-"TESTING". ALPHAMODE -1 Blend (with alpha channels) fully to background. Attention: Does not work on GP2X/PocketPC.

Moru

Yes it's obvious if you know that the command exists. Would be nice to put in a small notice somewhere close to where you list picture formats that is supported.

FutureCow

I'm lost. What does an ALPHAMODE of -.999 do?

Moru

It activates alphablending so everything you draw is a little bit transparent but it's so little that it is not noticable in normal case. However if you have a PNG with an alpha-channel, that will start blending too. Otherwise the whole PNG will be painted without transparent areas.

FutureCow

I suppose I'm going to have to play around with alpha values to figure it out, unfortunately even with the explanation I'm still not sure how a png with alpha values would end up looking with that alphamode set. (Then again, I've only tried to play with alpha values a few times and gave up when I couldn't figure out how to get Paint Shop Pro to export them properly :D


Moru

If you use Photoshop 6 or 7 you can export them  with "Save for the web" or something like that and there choose PNG as format with as many colors you want and set the transparency flag. That way you can have sprites that are not only 1 bit transparent (either it's transparent or it's not) but many more levels, not sure if it's 8 bit transparency on PNG. So 256 different shades of transparent between 0% and 100%. Nice way of making smoth transitions on edges that doesn't depend on what color the background is. Or windows that are partly transparent in the middle of the sprite.