![]() |
Pixelblending mit Alphawert
Hi,
ich habe ein klitze kleines Problem. Wie berechne ich ein Pixelblending mit Alphawert ? |
Re: Pixelblending mit Alphawert
pZusammen = p1 * alpha + p2 * (1-alpha)
p1 ist der Pixel mit Alphawert, p2 der Hintergrund |
Re: Pixelblending mit Alphawert
Ja, genau danke.
|
Re: Pixelblending mit Alphawert
das von jakobwenzel funktioniert übrigens nur wenn der Alphawert einen Wert <= 1 hat.
Bei TBitmap wo der Alphakanal aus 8 Bit besteht wäre anstelle von 1 also 255 zu verwenden. |
Re: Pixelblending mit Alphawert
die 1 (für 100%) stimmt in diesem Falle schon
0.0 >= alpha > 1.0 pZusammen = p1 * alpha + p2 * (1 - alpha) 0 >= alpha > 255 pZusammen = (p1 * alpha div 255) + (p2 * (255 - alpha) div 255) PS: Berechnung für jeden Farbkanal der Pixel einzeln ... das sollte wohl bekannt sein? |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz