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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 iexShellThumbnails - Help

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
wesleybobato Posted - Apr 13 2013 : 05:22:45
Hello William could help me?
ImageEn in VERSION 4.3.0 unit iexShellThumbnails was added to the following method ExtractExplorerThumbnail (...);
So I try to put Use.
TImageEnMView1.AppendImage;
ExtractExplorerThumbnail ('sFilepath', TImageEnMView1.Bitmap);
However it does not work can you help me how to use this method of this new unit

thank you again.
10   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 14 2013 : 16:58:40
Sorry Wesley,

I have been reminded (Thanks Bill) that video thumbnail support is only available when thumbnails are loaded on demand (not possible with append).

For the next release video thumbnails will also be supported for AppendImage when StoreType=ietThumb.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
wesleybobato Posted - Apr 13 2013 : 16:15:43
hello nigel thanks for the tip! I'll add in my project here this method to load the video here.

Good Weekend a big hug.
xequte Posted - Apr 13 2013 : 14:56:16
Hi Wesley

Also, remember that if you are appending a video to a TImageEnMView then you don't need to use ExtractExplorerThumbnail, as the component will do it for you:


// Add some videos to a TImageEnMView (and show their explorer thumbnails)
ImageEnMView1.AppendImage('C:\A Video.mpeg');
ImageEnMView1.AppendImage('C:\A second Video.mpeg');
ImageEnMView1.AppendImage('C:\Another Video.avi');


If this is not working then check your values for iegMViewExplorerThumbnailExts:

http://www.imageen.com/help/iegMViewExplorerThumbnailExts.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
wesleybobato Posted - Apr 13 2013 : 11:55:51
Thank you William for his help.
w2m Posted - Apr 13 2013 : 11:52:20
procedure TForm1.Button1Click(Sender: TObject);
{ Extract Explorer Thumbnail. }
var
  iFilename: string;
  iIndex: integer;
  iBitmap: TBitmap;
begin
  OpenPictureDialog1.Filter := '';
  OpenPictureDialog1.Filter := OpenPictureDialog1.Filter + 'AVI Video (*.avi)|*.avi|';
  if OpenPictureDialog1.Execute then
  begin
    if FileExists(OpenPictureDialog1.FileName) then
    begin
      iFilename := OpenPictureDialog1.FileName;
      if HasExplorerThumbnail(iFilename) then
      begin
        iBitmap := TBitmap.Create;
        try
          if ExtractExplorerThumbnail(iFilename, iBitmap, 170, 120) then
          begin
            iIndex := ImageEnMView1.AppendImage;
            ImageEnMView1.SetImage(iIndex, iBitmap);
            ImageEnView1.Update;
            UpdateGUI;
            UpdateStatusbar;
          end
          else
          begin            
            TaskDialog1.Caption := 'Unable To Extract Explorer Thumbnail';
            TaskDialog1.Text := ' Unable to extract explorer thumbnail from ' + iFilename +
              ' file.';
            TaskDialog1.ExpandedText :=
              'Not all video files contain an explorer thumbnail, but typically video files captured by video cameras have an explorer thumbnail.';
            TaskDialog1.Execute;
          end;
        finally          
          iBitmap.Free;
        end;
      end
      else
      begin
        TaskDialog1.Caption := 'No Explorer Thumbnail';
        TaskDialog1.Text := 'The file ' + iFilename + ' does not have an explorer thumbnail.';
        TaskDialog1.Execute;
      end;
    end;
  end;
end;

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
wesleybobato Posted - Apr 13 2013 : 10:15:01
William here in this link which talks about the launch of ImageEn 4.3, shows this method being used in a TImageEnMView is this possible??

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=896
wesleybobato Posted - Apr 13 2013 : 10:09:17
Thank You For Your Help William again.
Good weekend for you a big hug.
w2m Posted - Apr 13 2013 : 08:32:54
This works for me...
procedure TForm1.Open1Click(Sender: TObject);
{ Extract Explorer Thumbnail. }
var
  iFilename: string;
begin
  OpenPictureDialog1.Filter := '';
  OpenPictureDialog1.Filter := OpenPictureDialog1.Filter + 'AVI Video (*.avi)|*.avi|';
  if OpenPictureDialog1.Execute then
  begin
    if FileExists(OpenPictureDialog1.FileName) then
    begin
      iFilename := OpenPictureDialog1.FileName;
      if HasExplorerThumbnail(iFilename) then
      begin
        if ExtractExplorerThumbnail(iFilename, ImageEnView1.Bitmap, 170, 120) then
        begin
          ImageEnView1.Update;
          StatusBar1.Panels[0].Text := EllipsifyText(True, ExtractFileDir(iFilename), Canvas,
            StatusBar1.Panels[0].Width);
          StatusBar1.Panels[1].Text := EllipsifyText(False, ExtractFileName(iFilename), Canvas,
            StatusBar1.Panels[1].Width);
          StatusBar1.Panels[2].Text := 'Width: ' + IntegerToString(ImageEnView1.Bitmap.Width);
          StatusBar1.Panels[3].Text := 'Height: ' + IntegerToString(ImageEnView1.Bitmap.Height);
        end
        else
        begin          
          TaskDialog1.Caption := 'Unable To Extract Explorer Thumbnail';
          TaskDialog1.Text := ' Unable to extract explorer thumbnail from ' + iFilename + ' file.';
          TaskDialog1.ExpandedText := 'Not all video files contain an explorer thumbnail, but typically video files captured by video cameras have an explorer thumbnail.';
          TaskDialog1.Execute;
        end;
      end
      else
      begin        
          TaskDialog1.Caption := 'No Explorer Thumbnail';
          TaskDialog1.Text := 'The file ' + iFilename + ' does not have an explorer thumbnail.';
          TaskDialog1.Execute;
      end;
    end;
  end;
end;

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
wesleybobato Posted - Apr 13 2013 : 07:58:14
Hello I'm trying William Getting a thumbnail of a video file, AVI, MPEG, MPG, MP4 ....

But I did not understand how I capture the thumbnail and add the TImageEnMView.

you know how this works?
w2m Posted - Apr 13 2013 : 07:32:22
This only extracts a thumbnail from the first frame of a video file I believe. Are you trying to get a thumbnail from a video file or from a jpg, png or tif or other file format?

William Miller