Alphapixel-Maker (draw images with antialiasing)

Miscellaneous Forums/Blitz Showcase/Alphapixel-Maker (draw images with antialiasing)

i checked a png-dll long time ago, but this don't work... PNG support alpha-channel! But BB do not load alpha-channel.

hm my english is not so good to explain this.

You read a pixel from white image and another pixel from black image. If you have different colors (and not black/white) - you found a alpha-pixel. Delta1 is the difference to black color. Delta2 is the difference to white color. Draw line from "0 to color 1" and "255 to color2" in a graph - at the intersection of this lines, you find "true color" and you can reconstruct the alpha-value.

Easier: If your color is 255 (from one channel) and alpha=50%. Your value on white-image don't change, but value on black-image lose 50% of intensity. It is easy to reconstruct the original value.