How to crop image in Delphi
It's very simple. Just drop TImagePro component onto your form, load the image to this component, run application and call the EnterCropMode method from your code.
procedure TMainForm.SpeedButtonCropModeClick(Sender: TObject); begin with ImagePro do if Cropping then ExitCropMode else EnterCropMode; end;
The frame of cropping area will be shown over your image. Edit the area and call the CropBySelection method to crop image.
procedure TMainForm.SpeedButtonCropClick(Sender: TObject); begin with ImagePro do CropBySelection; SpeedButtonCropMode.Down:=False; end;
Also you can crop image by simple calling the CropByRect method that receives crop area as a passed parameter.