Вверх ↑
Ответов: 49
Рейтинг: 11
#1: 2011-01-15 17:23:14 ЛС | профиль | цитата
Хорошо, я сделал обе исходные 32 битными, финал тот-же.
стандартная API функция ОС

Похоже Microsoft знает только метод Additive, что и является причиной результата. Прявильней при совмещении графики с альфой использовать Substructive.

An additive merge assumes that both foreground and background images are pre-multiplied, meaning that the pixels in the color channels have been multiplied against the pixels in the alpha channel. The result is that transparent pixels are always black, since any number multiplied by a 0 is always going to be 0.

If the images are not pre-multiplied then usually all that is required is a subtractive merge. This method uses the alpha channel from the foreground to cut, or subtract, a hole from the background image. Simply fit the foreground image into that hole. That is known as a subtractive merge.


Подскажите, раз тот способ не работает, как поступить, если надо наложить одно изо 24бит на другое 24бит взяв альфу из третьего изо 8 бит (или 24). В рамках Hiasm я пока вижу способ использования альфы, уже прописанной в картинке.
------------ Дoбавленo в 17.23:
Вот, кстати, математика для каждого пиксела:
Additive:
R1 + R2 * A2
G1 + G2 * A2
B1 + B2 * A2

Substructive:
R1 * (255 - A2) + R2 * A2
G1 * (255 - A2) + G2 * A2
B1 * (255 - A2) + B2 * A2
карма: 1

0