Einzelnen Beitrag anzeigen

Medium

Registriert seit: 23. Jan 2008
3.686 Beiträge
 
Delphi 2007 Enterprise
 
#7

AW: [GR32] How to blend two TBitmap32s

  Alt 19. Sep 2010, 18:28
That's a simple multiplication, and has nothing in the world to do with alpha. Just multiply 1 and 2, and be done.

Edit: Well, it looks like in 5 alpha controls the strength, so that the result becomes B1 * (alpha2+(1-alpha2)*B2)

Edit2: And be aware, that whenever we talk about colors, their intensity is thought to range between 0 and 1. So if you have to work with Bytes, don't forget to scale them to 0..1, or you'll get wrong results.
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)

Geändert von Medium (19. Sep 2010 um 18:37 Uhr)
  Mit Zitat antworten Zitat