Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TroneX

API Per Pixel Alpha-Blending

This topic is 5557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to create a splash screen which basically presents itself as a non-rectangular image which has "fuzzy" edges that blend out. For this I already have the image which an alpha mask containing the alpha values for each pixel. To get this working with windows 9x as well, I first make a screenshot of the part of the screen, I want to blend over the splash screen. Having this, I now want to alpha blend my splash screen over the screenshot (on a per-pixel basis) and write the result back to the screen. How do I do this? There are several API functions from MS which seem to be able to do this, but I cannot figure out, how they work. Next problem is, that I need a fileformat which can be read without problems (preferebly BMP) and which also contains the alpha values in a way that the API functions understands them .. Does anyone have an example for this? Buy BomberFUN online now for only EUR/USD 19,95 at http://www.bomberfun.com

Share this post


Link to post
Share on other sites
Advertisement
Allright ... in case you already thought of a solution, thanks a lot. But Actually, I finally managed to solve that problem on my own ;-)

Regards,
TroneX

Buy BomberFUN online now for only EUR/USD 19,95 at http://www.bomberfun.com

Share this post


Link to post
Share on other sites
I actually use the targa file format now (.tga) which is perfectly suitable for my needs, since it does not only support any bitrate but is even capable of including alpha masks ;-)

For this I found some sample code on the net which let''s me load a tga file into the memory and also pre multiplies the pixels with the alpha values.

Greetz,
Tronex

Buy BomberFUN online now for only EUR/USD 19,95 at http://www.bomberfun.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!