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
 How to extract some images from ImageEnFolderMView

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
mmiranda Posted - Jan 15 2014 : 11:22:04
Hello,

I'm trying "TImageEnFolderMView" but I would like to know how to extract thumbnail images, especially when show large icons of unknown files such as Windows Explorer.

(CopyThumbnailImage to TImage or TImageEnView)

thanks
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 16 2014 : 12:34:00
Hi

Also, you can add the extension to:

http://www.imageen.com/help/TIEImageEnGlobalSettings.MViewExplorerThumbnailExts.html

Even if it is a supported ImageEn image format.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Jan 15 2014 : 12:22:59
Open the FolderMView demo in the ..\Multi\FolderMView samples folder.
Add a TCheckBox next to the show preview checkbox at the bottom of the form adjacent to the ShowPreview checkbox. Give the checkbox a name of Thumbnail1. Add hyieutils, iexHelperFunctions to implementation uses.

Then replace the code in the tmrUpdatePreviewTimer event with:
procedure TForm1.tmrUpdatePreviewTimer(Sender: TObject);
var
  iMaxX: Integer;
  iMaxY: Integer;
  iCanStretch: Boolean;
  iQualityFilter: TResampleFilter;
  iAddBorder: Boolean;
  iBorderColor: TColor;
  iAddShadow: Boolean;
  iBlurRadius: Integer;
  iShadowOffset: Integer;
  iShadowColor: TColor;
  iBackgroundColor: TColor;
  iIEBitmap: TIEBitmap;
begin
  tmrUpdatePreview.Enabled := False;
  if chkPreview.checked = False then
    ImageEnView1.Blank
  else if ImageEnView1.IO.Params.Filename <> IEFolderMView.SelectedFilename then
  begin
    if IEFolderMView.SelectedFilename = '' then
      ImageEnView1.Blank
    else
    begin
      { Set the thumbnail parameters }
      iMaxX := ImageEnView1.ClientWidth;
      iMaxY := ImageEnView1.ClientHeight;
      iCanStretch := False;
      iQualityFilter := rfLanczos3;
      iAddBorder := True;
      iBorderColor := clWhite;
      iAddShadow := True;
      iBlurRadius := 4;
      iShadowOffset := 4;
      iShadowColor := clBlack;
      iBackgroundColor := clWhite;
      { If thumbnail is checked then get the image from IEFolderMView and
        convert it to a thumbnail.  Assign the thumbnail to ImageEnView1 and
        update ImageEnView1. Then release the bitmap to prevent memory leak! }
      if Thumbnail1.Checked then
      begin
        iIEBitmap := IEFolderMView.GetTIEBitmap(IEFolderMView.SelectedImage);
        iIEBitmap.IEConvertToThumbnail(iMaxX, iMaxY, iCanStretch,
          iQualityFilter, iAddBorder, iBorderColor, iAddShadow, iBlurRadius,
          iShadowOffset, iShadowColor, iBackgroundColor);
          ImageEnView1.IEBitmap.Assign(iIEBitmap);
        ImageEnView1.Update;
        IEFolderMView.ReleaseBitmap(IEFolderMView.SelectedImage);
      end
      else
      { Load the image from a file }
      begin
        ImageEnView1.IO.LoadFromFile(IEFolderMView.SelectedFilename);
      end;
    end;
  end;
end;

If the show preview checkbox is checked and the thumbnail checkbox is checked, a thumbnail of the selected image will be created and displayed. A thumbnail of System images as well as supported file types will be created. If the thumbnail checkbox is not checked, then the full image will be loaded from disk if the selected image is a supported file type and is not a system image.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html