Form1 = main program
JPEGImage1: TJPEGImage; //Handel the jpeg image.
ScrollBox1: TScrollBox; // handel big jpeg image.
OpenDialog1: TOpenDialog; //Dialog for load the jpeg file.
PopupMenu1: TPopupMenu; //popup menu
SaveImage: TMenuItem;
LoadImage: TMenuItem;
Avsluta: TMenuItem; //Exit program
Form2 = Preview windows
Image1:Timage
This code in the Unit1.pas at procedure TForm1.JPEGImage1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
- Code: Select all
For addX:=1 to 95 do
Begin
For addY:=1 to 67 do
Begin
Form2.Image1.Canvas.Pixels[addX, addY] := Form1.JPEGImage1.Canvas.Pixels[ziX+addX,ziY+addY];
End;
End;
This programcode works but not as good I want it to, what can I do for a better code?