Function BitBtnClick ends with parent window's closing
Original Reporter info from Mantis: Puma Veloce
-
Reporter name: Henri Maquoi
Original Reporter info from Mantis: Puma Veloce
- Reporter name: Henri Maquoi
Description:
This kind of code works quite well but.. ends closing the parent window!
procedure TFormDisplay.BtnGreyToColorClick(Sender: TObject);
Var
I, J, MinX, MinY, MaxX, MaxY, Colour, ColRef, Count,
R, G, B: Integer;
begin
Count:=0;
For J:=0 to Image.Picture.BitMap.Height-1 do Begin
For I:=0 to Image.Picture.BitMap.Width-1 do Begin
Colour:=Image.Picture.Bitmap.Canvas.Pixels[I, J];
R:=red(Colour);
G:=Green(Colour);
B:=Blue(Colour);
If (R=G) and (R=B) Then Begin
Image.Picture.Bitmap.Canvas.Pixels[I, J]:=GetColorFromGrey(Colour);
Inc(Count);
Image.Refresh;
end;
end;
end;
end;
Mantis conversion info:
- Mantis ID: 36059
- Version: 2.0.4
- Monitored by: » Puma Veloce (Henri Maquoi)