ImageEn, unit imageenview

TImageEnView.OnImageLoaded

TImageEnView.OnImageLoaded


Declaration

property OnImageLoaded: TNotifyEvent;


Description

Occurs whenever an image has been loaded (e.g. using TImageEnView.IO.LoadFromFile.
OnImageLoaded is useful to update your UI when you are loading asynchronously.

Note: When loading completes OnImageLoaded and OnFinishWork will both fire


Example

// Load images in background thread
procedure TMainForm.btnLoadClick(Sender: TObject);
begin
  ImageEnView1.AsyncLoading := True;
  ImageEnView1.IO.LoadFromFile( IEFolderMView.SelectedFilename );
end;

// Update the UI
procedure TMainForm.ImageEnView1ImageLoaded(Sender: TObject);
begin
  lblSize.Caption := Format( '%d x %d px', [ ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height ]);
end;