ImageEn, unit imageenproc |
|
TImageEnProc.OnProgress
Declaration
property OnProgress: TIEProgressEvent;
Description
Occurs whenever image processing operations are executed. If you use it to update a progress bar then you should reset it in the
OnFinishWork event.
You can use
ProgressTask to determine what action is underway.
To access processing progress for the
Proc class of a TImageEnView, use the
OnProgress event.
// Show progress display during processing operations
procedure TMainForm.ImageEnProc1Progress(Sender: TObject; per: Integer);
begin
ProgressBar1.Position := per;
ProgressBar1.Visible := True;
Application.ProcessMessages;
end;
// Hide the progress bar
procedure TMainForm.ImageEnProc1FinishWork(Sender: TObject);
begin
ProgressBar1.Visible := False;
end;
// Showing detailed progress display
procedure TMainForm.ImageEnProc1Progress(Sender: TObject; per: Integer);
begin
case ImageEnProc1.ProgressTask of
ietProcessing : Caption := format( 'Processing - %d%%', [per] );
ietAnalysis : Caption := format( 'Analyzing - %d%%', [per] );
ietResampling : Caption := format( 'Resizing - %d%%', [per] );
ietRotating : Caption := format( 'Rotating - %d%%', [per] );
else Caption := format( 'Processing - %d%%', [per] ); // Should not occur
end;
end;