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
 Opendialog question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

spetric

Croatia
308 Posts

Posted - Feb 26 2015 :  15:00:27  Show Profile  Reply
Hi,

When OpenImageEnDialog is executed and some avi file is selected, in the right pane is information regarding the number of frames.
How can I get this information from dialog preview?

What I want is to make possible to read a frame from avi as TIeBitamp. I know it can be done using OpenMediaFile method with SelectedFrame, but how to know if there are more then one frame in the file (it can be TIFF as well).

w2m

USA
1990 Posts

Posted - Feb 26 2015 :  16:55:20  Show Profile  Reply
IEGetFileFramesCount

Declaration
function imageenio.IEGetFileFramesCount(const FileName: WideString): Integer;

Description
A generic method to get the number of frames in a multi-page images and supported videos (GIF, TIFF, AVI, MPEG...).

Note: It will work with single page files too (such as JPEG) by returning 1.



Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Feb 27 2015 :  01:27:11  Show Profile  Reply
That's it (I did not check helper functions).

Thanks Bill.



Go to Top of Page

spetric

Croatia
308 Posts

Posted - Feb 27 2015 :  02:14:33  Show Profile  Reply
Hi,

I've tried loading selected frame:

IO->Params->ImageIndex = frame;
IO->LoadFromFile(file_string);

It works well for animated gif and multipage tiff, however it does not work for madia files (AVI, MPEG, etc...). For such file types, as stated in help, I must
first open media file, then load selected frame and then close media file.

Is there any option to load selected frame in the same manner (with same instructions set), no matter of file type?

If not, is it possible to detect if file contains video data (without separately checking if it is AVI, MPEG or WMV?


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: