All pastes #676828 Raw Edit

John

public text v1 · immutable
#676828 ·published 2007-08-31 13:17 UTC
rendered paste body
procedure TForm1.Button4Click(Sender: TObject);
Var
  LT, LL, LB, LR : integer;
  LPath, LName : String;
begin

  LT := SpinEdit1.Value;
  LL := SpinEdit2.Value;
  LB := SpinEdit3.Value;
  LR := SpinEdit4.Value;

  if (LT >= LB) or (LL >= LR) then Exit;

    LPath := 'C:\Documents and Settings\xxx\Desktop\xxx\';

    Image2.Picture.LoadFromFile(LPath + 'xxx-Temp.bmp');

    Image2.Width := LR - LL;
    Image2.Height := LB - LT;

    Image2.Canvas.Draw(LL, LT, Image2.Picture.Bitmap);

    Image2.Picture.SaveToFile(LPath + 'crop_' + 'CurrentRoll-Temp.bmp');
    Image2.Picture.LoadFromFile(LPath + 'crop_' + 'CurrentRoll-Temp.bmp');

    ShowMessage('Cropping complete');
end;