@jfheins, I'm doing something wrong
:
Delphi-Quellcode:
var
Row: PBGRAQuad;
Color: TBGRAQuad;
I, J: Integer;
B: Byte;
C: TColor;
begin
Color := ColorToTriple24(AColor);
Row := PBGRAQuad(@ASource.Bits[0]);
for I := 0
to ASource.Height - 1
do
begin
for J := 0
to ASource.Width - 1
do
begin
B := (Row.R + Row.G + Row.B)
div 3;
C := TColor(Round((1 - (APercent / 100)) *
RGB(Row.R, Row.G, Row.B) + (APercent / 100) * (
RGB(Color.R, Color.G, Color.B) * B)));
Row.R := GetRValue(C);
Row.G := GetGValue(C);
Row.B := GetBValue(C);
Inc(Row);
end;
end;
end;
@fkerber, Ok, I'll remmeber.