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
 Loading PNG causes "WIC Failure" in 64bit
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

steinmpa

Germany
2 Posts

Posted - Sep 20 2021 :  08:09:41  Show Profile  Reply
Hi,

we're using ImageEn Version 10.1.0 with Delphi 10.4.2.

By using ImageEn in an 64bit environment we get an Exception by processing PNG-Images (not with BMP/JPG!).

In following unit we get an Exception "ExceptionMessage="WIC Failure"":

iewic.pas:

procedure ConvertWICBitmapToIEBitmap(wicFactory: IE_IWICImagingFactory; source: IE_IWICBitmapSource; dest: TIEBitmap; nativePixelFormat: boolean = true; OnProgressFunc: TIEProgressEvent = nil);
...
  CheckHResult( converter.Initialize( source, pixelFormatGUID, IE_WICBitmapDitherTypeNone, nil, 0.0, 0 ));
...  

CheckHResult is errorcode: "-2003292409":

Could you give us some information what could cause this exception and maybe ways to fix it.

Thanks in advance.

xequte

6419 Posts

Posted - Sep 20 2021 :  16:05:42  Show Profile  Reply
Hi

Firstly, you should use ielib64.dll in 64bit ImageEn, rather than WIC.

WIC has a numbers of limitations, particularly with PNG:

https://www.imageen.com/help/TIEImageEnGlobalSettings.PNGEngine.html


Secondly, tell me more about how to reproduce the WIC error.



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

steinmpa

Germany
2 Posts

Posted - Sep 21 2021 :  04:49:44  Show Profile  Reply
*Solved*

Our installation routine missed to update your mentioned ielib64.dll.
After correcting our update routine it now works like a charm.

Thanks for your help.
Go to Top of Page

xequte

6419 Posts

Posted - Sep 21 2021 :  19:38:19  Show Profile  Reply
Hi

Yes, it's easy to miss that.

You should explicitly set the imaging engine to DLL so an error is raised if it is not found:

// Force use of IELib DLL for improved performance
// ImageEn will attempt to load the DLL even if it's not in the EXE folder. If the DLL isn't found or is an old version, an error will be raised
IEGlobalSettings().JPEGEngine := ieenDLL;
IEGlobalSettings().PNGEngine := ieenDLL;
IEGlobalSettings().JPEG2000Engine := ieenDLL;
IEGlobalSettings().CameraRawEngine := ieenDLL;


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