Function Brightness(MInput:Matriks; Value:integer):Matriks;
var
i,j : integer;
MOutput : Matriks;
begin
SetLength(MOutput,Length(MInput),Length(MInput[0]));
for i:=0 to Length(MOutput)-1 do
begin
for j:=0 to Length(MOutput[0])-1 do
begin
MOutput[i,j]:=MInput[i,j]+value;
if (MOutput[i,j]>255) then MOutput[i,j]:=255;
if (MOutput[i,j]<0) then MOutput[i,j]:=0;
end;
end;
Brightness:=MOutput;
end;
No comments:
Post a Comment