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
 TImageEnMView: Extract Icons from Exe?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

926 Posts

Posted - Sep 22 2024 :  11:48:04  Show Profile  Reply
Does TImageEnMView have a built-in method to extract all icons from an EXE file?

xequte

38531 Posts

Posted - Sep 22 2024 :  21:44:19  Show Profile  Reply
Hi Peter

You can email me for the latest beta, which has TIEMultiBitmapHelper.LoadFromResource().

e.g.

ImageEnMView1.Clear();
ImageEnMView1.IEMBitmap.LoadFromResource('explorer.exe', [ ietrIcon]);
ImageEnMView1.Update();


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

PeterPanino

926 Posts

Posted - Sep 26 2024 :  09:17:43  Show Profile  Reply
// Load all "Icon" type resources from "explorer.exe"
  ImageEnMView1.Clear();
  // resource types: ietrIcon, ietrBitmap, ietrGroupIcon, ietrAniIcon, ...
  ImageEnMView1.IEMBitmap.LoadFromResource( 'explorer.exe', [ ietrIcon ] );
  ImageEnMView1.Update();


The images are all shown with the same thumbnail sizes:



Isn't it possible to show them with their RELATIVE size?

Thank you for this function, which simplifies loading resources and everything.
Go to Top of Page

PeterPanino

926 Posts

Posted - Sep 26 2024 :  10:20:40  Show Profile  Reply
This Filter hides all images with a size lesser than 256 x 256 pixel:

procedure TForm1.ImageEnMView1Filter(Sender: TObject; Index: Integer; const Filename: string; var ShowFrame: Boolean);
begin
  if (ImageEnMView1.ImageWidth[Index] < 256) or (ImageEnMView1.ImageHeight[Index] < 256) then
    ShowFrame := False;
end;


Go to Top of Page

xequte

38531 Posts

Posted - Sep 26 2024 :  15:07:13  Show Profile  Reply
Thanks, the example is updated in the release version.

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