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
 save first frame
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mnosouhi

4 Posts

Posted - Jun 19 2015 :  20:02:38  Show Profile  Reply
hi
How do the first frame of a video file in a jpg file I saved?
I use version 5.2.0.
thanks

xequte

38510 Posts

Posted - Jun 21 2015 :  19:09:14  Show Profile  Reply
Hi

Sorry, so you have loaded a video file into a TImageEnMView? And want to save the first frame as a JPEG?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mnosouhi

4 Posts

Posted - Jun 22 2015 :  07:39:14  Show Profile  Reply
yes dear
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jun 22 2015 :  09:08:07  Show Profile  Reply
Here is one way to save the video file first frame to a jpg file:

procedure TForm1.SaveFirstFrame1Click(Sender: TObject);
var
  iIEBitmap: TIEBitmap;
begin
  if SavePictureDialog1.Execute then
  begin
    iIEBitmap := TIEBitmap.Create;
    try
      iIEBitmap.Assign(ImageEnMView1.GetTIEBitmap(0));
      iIEBitmap.Write(SavePictureDialog1.FileName);
      ImageEnMView1.ReleaseBitmap(0);
    finally
      iIEBitmap.Free;
    end;
  end;
end;


Another way is:
ImageEnMView1.GetImageToFile(0, SavePictureDialog1.FileName);

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

mnosouhi

4 Posts

Posted - Jun 22 2015 :  14:10:25  Show Profile  Reply
very thanks
i use this code to load video file to ImageEnMView1 :
ImageEnMView1.MIO.LoadFromFile('g:\video.mp4');

Is the code right , when I'm going to use only the first frame?
Is there a way that not needed loaded Full Video ?
Go to Top of Page

xequte

38510 Posts

Posted - Jun 24 2015 :  15:24:01  Show Profile  Reply
Hi

To load just the first frame you can use:

ImageEnMView1.Clear;
ImageEnMView1.AppendImage( 'g:\video.mp4' + IEM_Path_Index_Delimiter + 0 );

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mnosouhi

4 Posts

Posted - Jun 25 2015 :  05:09:31  Show Profile  Reply
thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: