ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Load random limited images from the directory.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Aamir

India
17 Posts

Posted - Oct 12 2023 :  10:39:56  Show Profile  Reply
Hi,

Can we load random limited images from the directory by using ImageEnMView1.FillFromDirectory('ImageFolderPath');


Suppose I have a directory having 1000 images. now I want to load 200 images randomly every time. When I call the same statement ImageEnMView1.FillFromDirectory('ImageFolderPath').


Aamir

xequte

38610 Posts

Posted - Oct 12 2023 :  15:56:33  Show Profile  Reply
Hi Aamir

You could use FillFromDirectory() if you limit the filling by excluding some files in the OnImageAdd event:

https://www.imageen.com/help/TImageEnMView.OnImageAdd.html


But I think it would be easier to retrieve the file list yourself
(e.g using:https://www.imageen.com/help/GetAllFiles.html )

Then build an insertion list by randomly drawing from the file list until you have 200 images, and finally call:

https://www.imageen.com/help/TImageEnMView.FillFromList.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: