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
 Program EXE size - Delphi 7

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
HNRSoftware Posted - Oct 01 2019 : 08:00:00
I've owned ImageEN for years, maybe decades, (recently installed 8.6) but have only used it sparingly mainly because the exe footprint is so large. My critical use is an image deskew, which are a couple if TImageEnProc calls. It works beautifully. My problem is that using this turns my 550k program into a 3.4Mb program.

I am very old-school, (Delphi 7) and I rely on exe size being an indicator that I am bringing in many units that I do not want, which can make things harder to debug.

ImageEN has a 32bit windows dll, and it "feels" like this job should be done in the dll and should add a very small amount to the footprint. I must be doing something wrong, but I can't figure out what.

Any thoughts?
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 03 2019 : 17:09:36
Hi Howard

We have fixed the define errors. You can email us for an update, or just comment out the deprecated code.

The rotate change is easy to fix. This is the undefined method:

{$ifdef IEIncludeDeprecatedInV4}
// Deprecated in 5.0.0
procedure TImageEnProc.Rotate(Angle: Double; AntiAlias: Boolean; AntialiasMode: TIEAntialiasMode; BackgroundColor: TColor);
begin
  if AntiAlias then
    Rotate(Angle, AntiAliasMode, BackgroundColor)
  else             
    Rotate(Angle, ierNone, BackgroundColor)
end;
{$endif}


So just remove the AntiAlias boolean parameter, and specify ierNone for AntiAliasMode if it was false.

Nigel
Xequte Software
www.imageen.com
HNRSoftware Posted - Oct 03 2019 : 09:18:24
Hi Nigel - thanks for the pointer. I brute-force commented out about half of the defines -- the ones that I didn't think I would need. The rebuild of 300,000+ lines got me a single error -- undefined ielkAngle which seems to be connected with layers. Sticking the layers define back in solved that and the rebuilt library saved about 1.2Mb in exe size.

After quick success there, I went back and undefined some more things. I hit an error on GetAutoFit due to the deprecatedinversion8 define.

Apparently, the ImgProc.Rotate which I use got deprecated, so I had to redefine the whole group of deprecated defines. I think I need to track down where the Rotate function got renamed to or moved to.

As best as I can tell, I've undefined the things I don't need (for now), but I really have no idea how much of the SDK I have disabled doing this. Net footprint savings were 1.65Mb out of a 3.4Mb exe -- pretty good. I think ImageEN's part of the exe is now about 1.0Mb.

Thank you for pointing me to this. I wish I had asked this question a decade or two ago....

Howard
xequte Posted - Oct 02 2019 : 21:26:15
Hi

EXE size is something I consider a lot. Please see the defines in ie.inc that outline units that can be undefined and how much they will reduce EXE size. Though naturally as ImageEn is a *big* library, adding it to a project will unavoidably make it much larger.

The DLL file is optional for 32bit projects. It only adds native Camera RAW support (and optionally faster JPEG and PNG loading).




Nigel
Xequte Software
www.imageen.com