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 image + video in ImageEnMView
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

122 Posts

Posted - Jul 05 2021 :  09:47:05  Show Profile  Reply
Hi,

I need to load images & videos from a folder (e.g. JPG, GIF, PDF, MP4). The files don't have an extension.

As I need only one thumbnail per file, currently I use the following functions:

//in case of PDF
ImageEnMView.PdfViewer.LoadFromFile(Path);
ImageEnMView.AppendImageEx(ImageEnView.IEBitmap);
ImageEnMView.PdfViewer.Close;

//in all other cases (images + videos)
ImageEnMView.AppendImage(Path + IEM_Path_Index_Delimiter);


Problem: With the above code, images are loaded rapidly, but the loading of videos is extremely slow.

Question: Is there a more appropriate way to get one thumbnail per file for PDF, images, multiframe images and videos?

Al

xequte

38180 Posts

Posted - Jul 05 2021 :  20:57:23  Show Profile  Reply
Hi Al

You shouldn't need the special PDF handling code you use above, as ImageEn should do that behind the scenes (when loading as a normal image).

The quickest way to get thumbnails for video files is to get it from Windows Explorer:

https://www.imageen.com/help/WindowsGetExplorerThumbnail.html


Also, ensure you also use OptimizeLoadingParams to get the fastest loading method for your thumbnails:

https://www.imageen.com/help/TIOParams.OptimizeLoadingParams.html

This demo may help:
Demos\Multi\MViewPerformance\Performance.dpr
https://www.imageen.com/files/demos/run/Multi/MViewPerformance/Performance.exe

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

aleatprog

122 Posts

Posted - Jul 13 2021 :  10:24:01  Show Profile  Reply
Hi Nigel,

I tried WindowsGetExplorerThumbnail but maybe due to the fact that the video files got no extension, loading is equally slow and even worse as it delivers ImageEnMView "broken link" icons instead of thumbnails for some video formats. Meanwhile ImageEnMView.AppendImage(Path + IEM_Path_Index_Delimiter) works perfect with standard formats like avi, mov, mp4, mpg, ogg, webm, wmv.

I confirm that ImageEnMView.AppendImage(Path + IEM_Path_Index_Delimiter) works also for PDF.

Thank you,
Al
Go to Top of Page

xequte

38180 Posts

Posted - Jul 13 2021 :  17:49:43  Show Profile  Reply
Hi Al

Thanks for the feedback. Glad to hear you have found a good solution.

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