Author |
Topic |
|
yogiyang
India
727 Posts |
Posted - Feb 02 2015 : 08:38:28
|
I am planning to switch from using ImageEn as a VCL to using it as a DLL but before I actually switch I would like to know as to whether I will be able to gain performance in loading PSD files or not?
Another thing switch from conventional VCL to DLL will require how much of rework?
TIA
Yogi Yang |
|
xequte
38615 Posts |
Posted - Feb 02 2015 : 15:22:12
|
Hi Yogi
Do you mean to fully encapsulate the ImageEn functionality within your own DLL? What are you reasons for doing that?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
727 Posts |
Posted - Feb 02 2015 : 23:58:58
|
Hi Nigel,
No I want the use the DLL that you have provided but I want to know if using it will improve loading of .PSD files and whether switching to the DLL version of ImageEn requires any other programming changes.
Yogi Yang |
|
|
xequte
38615 Posts |
|
yogiyang
India
727 Posts |
Posted - Feb 03 2015 : 00:48:54
|
Hi Nigel,
Thanks for the feedback.
I hope this will also speedup loading of thumbnails in ImageEnViewM?
TIA
Yogi Yang |
|
|
xequte
38615 Posts |
Posted - Feb 03 2015 : 22:44:49
|
Hi Yogi
Yes, there should be some improvement (up to 30% faster JPEG loading in our tests).
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
727 Posts |
Posted - Feb 04 2015 : 07:50:06
|
Hi Nigel,
Finally bit the bullet and tried my hands on trying to use the DLL.
Here is what I did: - I opened the file ie.inc - Changed this:
{.$undef IEUSEASM}
{.$define IEUSEDLLJPEGLIB}
{.$define IEUSEDLLPNGLIB}
{.$define IEUSEDLLJPEG2000LIB}
{.$define IEUSEDLLRAWLIB}
To
{.$undef IEUSEASM}
{$define IEUSEDLLJPEGLIB}
{$define IEUSEDLLPNGLIB}
{$define IEUSEDLLJPEG2000LIB}
{$define IEUSEDLLRAWLIB}
Recompiled the Package.
Restarted Delphi XE 6
Opened the project in question and Recompiled it.
Ran the executable outside Delphi IDE.
I took care to see that the DLL (ielib32.dll) was not present in the application directory/folder.
Yet the application ran as usual without giving any error.
Did I make any mistake here?
Please help.
TIA
Yogi Yang |
|
|
xequte
38615 Posts |
Posted - Feb 04 2015 : 19:18:46
|
Hi Yogi
Are you sure IEVision.dll is not in the folder. IEVision includes the ielib code, so you do not need to use ielib32.dll if ievision.dll is availalble.
Failing that, what is the result when you call IELibAvailable? Do you get any error when loading JPEG images?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
727 Posts |
Posted - Feb 05 2015 : 01:59:43
|
Hi Nigel,
I am not using IEVIsion as I don't have it!
But looking at the code posted earlier have I done the right correction or not?
After doing this correction what have I to do to start using the DLL?
TIA
Yogi Yang |
|
|
xequte
38615 Posts |
Posted - Feb 05 2015 : 03:44:49
|
Hi Yogi
Yes, you are using the correct method. Did you call IELibAvailable?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
727 Posts |
Posted - Feb 05 2015 : 06:19:52
|
Hi Nigel,
No I am not doing anything except compiling the VCL with new settings.
Can you point me to any web page that documents as to how to enable and use the DLL.
I am asking this coze when I run the app in question it does not give any error and works like a charm.
As per my understanding the app should actually give error of DLL not found and crash.
TIA
Yogi Yang |
|
|
xequte
38615 Posts |
Posted - Feb 05 2015 : 16:25:58
|
Hi Yogi
Call IELibAvailable it will return false if no ImageEn DLL is loaded.
Try to load a JPEG. It will raise an exception if it is expecting a DLL and it cannot be found.
Let me know what results you get.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
yogiyang
India
727 Posts |
Posted - Feb 05 2015 : 22:38:26
|
Hi Nigel,
After adding the above function to my code I am not able to get it to compile.
Have I to add any unit to the Uses clause?
Currently I am using following units in Uses clause: ImageEnProc, ImageEnView, ImageEnIO, hyiedefs, IEOpenSaveDlg, hyieutils, ievect, ieview, iemview
TIA
Yogi Yang |
|
|
yogiyang
India
727 Posts |
Posted - Feb 05 2015 : 22:47:47
|
Hi Nigel,
Solved the error after adding the unit ievision.
But still I do not get any error when the DLL is not in the executable folder and the app in question works without any problem.
This code ShowMessage(BoolToStr(IELibAvailable())); always return -1
TIA
Yogi Yang |
|
|
yogiyang
India
727 Posts |
Posted - Feb 05 2015 : 23:17:00
|
HI Nigel,
Sorry!
Actually the file ielib32.dll is copied to multiple folders and it also exists in System32 folder so I am always getting true even when the DLL is not in the executable folder.
That was dumb of me.
Once again sorry to bother you.
TIA
Yogi Yang |
|
|
xequte
38615 Posts |
Posted - Feb 06 2015 : 14:28:48
|
Sorry Yogi,
I should have warned that ielib32.dll is also installed to System32.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
|
|
|
Topic |
|