D
D
dollar2019-08-27 14:20:11
Algorithms
dollar, 2019-08-27 14:20:11

What formula is used when applying layers in normal mode?

I understand that the overlay occurs pixel by pixel (how else?).
Then let the first pixel be RGBA(r1, g1, b1, a1) and the second pixel be RGBA(r2, g2, b2, a2).
What will be the final pixel?
Or is it better to count in other units altogether?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan., 2019-08-27
@dollar

Here it is described in detail:
https://habr.com/ru/post/328386/
You can also see how the BitBlt / StretchBlt function works in WinApi, there is a dwRop parameter
Or search for Alpha Blending a Bitmap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question