Hello!
It is required to calculate the illumination of a point in a TPNGImage object, taking into account transparency. I wrote the following algorithm:
function GetBrightness(const AImage: TPNGImage; AX, AY: Integer): Integer;
var
LColor, LTransparentColor: TColor;
r, g, b,...