不知道这样行不行?
procedure TMainForm.RAdjustClick(Sender: TObject);
var
p
ByteArray;
x,y :Integer;
Bmp :TBitmap;
begin
Bmp :=TBitmap.Create;
Bmp.Assign(ChildForm.Image1.Picture.Bitmap);
Bmp.PixelFormat :=pf24Bit;
for y:=0 to Bmp.Height-1 do
begin
p:=Bmp.scanline[y];
for x:=0 to Bmp.Width-1 do
begin
if p[x*3+2] <245 then
begin
p[x*3+2]:=p[x*3+2]+10;
end;
end ;
end;
ChildForm.image1.Picture.Bitmap.Assign(Bmp);
Bmp.Free;
bmpnumber:=bmpnumber+1;
ChildForm.image1.Picture.SaveToFile('c:/temp/'+inttostr(bmpnumber)+'.bmp');
end;
procedure TMainForm.GAdjustClick(Sender: TObject);
var
p
ByteArray;
x,y :Integer;
Bmp :TBitmap;
begin
Bmp :=TBitmap.Create;
Bmp.Assign(ChildForm.Image1.Picture.Bitmap);
Bmp.PixelFormat :=pf24Bit;
for y:=0 to Bmp.Height-1 do
begin
p:=Bmp.scanline[y];
for x:=0 to Bmp.Width-1 do
begin
if p[x*3+1] <245 then
begin
p[x*3+1]:=p[x*3+1]+10;
end;
end ;
end;
ChildForm.image1.Picture.Bitmap.Assign(Bmp);
Bmp.Free;
bmpnumber:=bmpnumber+1;
ChildForm.image1.Picture.SaveToFile('c:/temp/'+inttostr(bmpnumber)+'.bmp');
end;
procedure TMainForm.BAdjustClick(Sender: TObject);
var
p
ByteArray;
x,y :Integer;
Bmp :TBitmap;
begin
Bmp :=TBitmap.Create;
Bmp.Assign(ChildForm.Image1.Picture.Bitmap);
Bmp.PixelFormat :=pf24Bit;
for y:=0 to Bmp.Height-1 do
begin
p:=Bmp.scanline[y];
for x:=0 to Bmp.Width-1 do
begin
if p[x*3] <245 then
begin
p[x*3]:=p[x*3]+10;
end;
end ;
end;
ChildForm.image1.Picture.Bitmap.Assign(Bmp);
Bmp.Free;
bmpnumber:=bmpnumber+1;
ChildForm.image1.Picture.SaveToFile('c:/temp/'+inttostr(bmpnumber)+'.bmp');
end;