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
 V4.1.4: DLL to speed up file loading
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

xequte

4143 Posts

Posted - Oct 23 2012 :  13:32:30  Show Profile  Reply
Hi

ImageEn v4.1.4 includes a beta of our new loading DLL, ielib32.dll. This optional library provides no functionality other than that included in the native ImageEn libraries, however due to optimized compilation you will find file loading is approximately 30% faster with it.

To use ielib32.dll you will need to edit ie.inc and change:

{.$define IEUSEDLLJPEGLIB}
{.$define IEUSEDLLPNGLIB}
{.$define IEUSEDLLJPEG2000LIB}
{.$define IEUSEDLLRAWLIB}

To

{$define IEUSEDLLJPEGLIB}
{$define IEUSEDLLPNGLIB}
{$define IEUSEDLLJPEG2000LIB}
{$define IEUSEDLLRAWLIB}

You will then need to recompile your packages. Naturally you will need to ship ielib32.dll with your application. Ideally this should be placed in the same folder as your EXE, but it can also be located on the system path.

Note: Delphi/BCB 5 and 6 are not supported


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com

jed

Australia
10 Posts

Posted - Oct 23 2012 :  15:54:28  Show Profile  Reply
Is the 30% across the board, or is it just for larger files? Is the improvement transferred to the thumbnail viewer as well?
Go to Top of Page

xequte

4143 Posts

Posted - Oct 23 2012 :  23:54:07  Show Profile  Reply
Any loading of JPEG or PNG files will be faster, whether it is for image display or thumbnails.



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

Uwe

272 Posts

Posted - Oct 24 2012 :  07:53:22  Show Profile  Reply
Hi Nigel


{$define IEUSEDLLRAWLIB}

^^
Does this include DCRAW support? Is the source code for ielib32.dll available? Will there be a 64bit version of dcrawlib.dll?

So many questions... ;)

Thx
Uwe
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Oct 25 2012 :  15:00:09  Show Profile  Reply
This looks great, but I can't just see where to put this code:
{$define IEUSEDLLJPEGLIB}
{$define IEUSEDLLPNGLIB}
{$define IEUSEDLLJPEG2000LIB}
{$define IEUSEDLLRAWLIB}

Also, it says change [block of code]... to [block of code]...
but both blocks look the same.

Sorry to be stupid.

Also, can I use this DLL with ImageMagic and DCRawLib?

If so, what code do I use and where, please? Do I still use
IEFileFormatRemove(ioRAW);
IEAddExtIOPlugIn('dcrawlib.dll');
IEAddExtIOPlugIn('imagemagick.dll');
Thanks

Patrick
Go to Top of Page

Uwe

272 Posts

Posted - Oct 25 2012 :  15:20:11  Show Profile  Reply
You edit the relevant $defines in the ie.inc file that comes with ImageEn and recompile the packages afterwards.

BTW: I didn't have the time to install the new version yet. Can you tell me whether the code for the DLL is supplied or not? Thanks!

Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Oct 25 2012 :  15:46:03  Show Profile  Reply
Hi Uwe.

Thanks. I'll try that tomorrow (but I'm still not sure what to replace).

The DLL source code: I can't see anything like ielib32.pas or ielibxxx.pas in the source folder, but perhaps I'm looking for the wrong thing?

regards

Patrick
Go to Top of Page

jed

Australia
10 Posts

Posted - Oct 25 2012 :  15:54:45  Show Profile  Reply
The first batch of defines have a DOT in front of them making them inactive. Remove the DOT to make the define active.

{.$DEFINE HAPPY} // inactive

{$DEFINE HAPPY} // active
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Oct 25 2012 :  16:11:17  Show Profile  Reply
Thanks jed. I hadn't noticed the dot.

It's starting to make more sense now.



regards

Patrick
Go to Top of Page

fab

1310 Posts

Posted - Oct 28 2012 :  00:09:28  Show Profile  Reply
Hi Uwe,

quote:
Does this include DCRAW support? Is the source code for ielib32.dll available? Will there be a 64bit version of dcrawlib.dll?


Yes, it includes DCRAW support. Actually ielib32.dll (and ielib64.dll) includes dcrawlib.
Consider 64 bit dcrawlib in ielib64.dll.
Go to Top of Page

Uwe

272 Posts

Posted - Oct 28 2012 :  10:37:43  Show Profile  Reply
Hi Fabrizio

Thanks for the information; appreciate it. Although I see one potential issue here: where is the source for the DLL's? If they include Dcraw as you say, don't you have to provide the DLL code if it contains restricted functions according to the Dcraw licence?

Anyway, I really hope that the source will be available at a later point in time when ImageEn 4.1.4 has left the beta phase. And I would certainly like to assume that you will *not* go down the path and start selling ImageEn without providing the source for important parts of the library. Can you please elaborate on the latter?

Thanks
Uwe
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Oct 30 2012 :  14:52:13  Show Profile  Reply
Hi everyone
quote:
You will then need to recompile your packages.
I've tried doing this but have had no success.

Can someone explain how to do this? (I'm using Delphi 2010).

Thanks

Patrick
Go to Top of Page

xequte

4143 Posts

Posted - Nov 01 2012 :  02:17:22  Show Profile  Reply
Hi Patrick

Do you mean to recompile the packages?



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

Patrick Quinn

United Kingdom
81 Posts

Posted - Nov 01 2012 :  02:40:43  Show Profile  Reply
Hi Nigel
quote:
Do you mean to recompile the packages?
Yes.

I don't really know what I'm doing.

If I open and compile package DPKIECTRL10;
I get error
[DCC Fatal Error] DPKIECTRL10.dpk(36): F1026 File not found: 'IERegCtrl.dcu'
at the lines
contains
  IERegCtrl in 'IERegCtrl.pas';

PKIECtrl10 seems to compile OK, though

regards

Patrick
Go to Top of Page

xequte

4143 Posts

Posted - Nov 02 2012 :  18:16:22  Show Profile  Reply
The easiest way to compile your Delphi 2006 ImageEn packages is as follows:

1. Copy the files in the folder, *ImageEn*\Source\Delphi10, to your Source folder (*ImageEn*\Source\)

2. Open each of the following in Delphi and click Compile:

DPKIECTRL10.DPK, DPKIEDB10.DPK, PKIECTRL10.DPK and PKIEDB10.DPK

If you have any probems then ensure that *ImageEn*\Source\ is listed in your "Library path"


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

fab

1310 Posts

Posted - Nov 03 2012 :  13:58:23  Show Profile  Reply
Uwe,

quote:
If they include Dcraw as you say, don't you have to provide the DLL code if it contains restricted functions according to the Dcraw licence?


dcraw included in ielib.dll doesn't use restricted code (GPL code). This DLL is just a wrapper over dcraw, jpeg lib, png lib, etc.

quote:
Anyway, I really hope that the source will be available at a later point in time when ImageEn 4.1.4 has left the beta phase. And I would certainly like to assume that you will *not* go down the path and start selling ImageEn without providing the source for important parts of the library. Can you please elaborate on the latter?


I understand your point of view (and I agree with you). Anyway at the moment I don't know if DLL code will be available.
Specific needs are taken into account.
Go to Top of Page

Uwe

272 Posts

Posted - Nov 03 2012 :  15:19:12  Show Profile  Reply
Hi Fabrizio

Thank you so much for your feedback! I really appreciate your honesty.

Uwe
Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Nov 07 2012 :  16:17:19  Show Profile  Reply
Hi Nigel/Fabrizio

I've now recompiled the four packages, and put ielib32.dll in the project folder of my program.

Now, when I try to load JPEG thumbnails I get an exception in unit jpegfilt:
function IEJPEG_Decomp_AllocDecompStruct():IEJPEG_Decomp_Struct;
quote:
Project imagematik.exe raised exception class EIEJPEGException with message 'ievision.dll, ievision64.dll, ielib.dll
or ielib64.dll not found'.
I don't understand, because the ielib32.dll definitely is in the .exe folder.

Do you need to have ievision as well?

Or is it expecting ielib.dll, not ielib32.dll?
If so can I just rename the ielib32.dll to ielib.dll?

Or am I doing something very stupid?

regards

Patrick
Go to Top of Page

jed

Australia
10 Posts

Posted - Nov 07 2012 :  16:23:46  Show Profile  Reply
I would say rename it to ielib.dll.

It should be easily to recompile the packages as that is what I do because I don't want components in the Program Files folder. Why the package source files don't have relative links to the source location shows that the build process for ImageEN is disjointed from what is built and then delivered and should be fixed.

Relying on library paths for a component library is bad.



Go to Top of Page

Patrick Quinn

United Kingdom
81 Posts

Posted - Nov 07 2012 :  16:38:15  Show Profile  Reply
Thanks for quick reply, jed.

Yes, renaming ielib32.dll to ielib.dll makes it work.

Perhaps the source should be changed instead, as ielib32.dll is a better name as it shows it is 32 bit, but I'll leave that to Nigel or Fabrizio to sort out.

Loading is much faster, quite an impressive improvement.

regards

Patrick
Go to Top of Page

jed

Australia
10 Posts

Posted - Nov 07 2012 :  16:39:15  Show Profile  Reply
Let us know if you notice improvement in performance.
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To: