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
 Loading PNG causes "WIC Failure" in 64bit

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
steinmpa Posted - Sep 20 2021 : 08:09:41
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.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 21 2021 : 19:38:19
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
steinmpa Posted - Sep 21 2021 : 04:49:44
*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.
xequte Posted - Sep 20 2021 : 16:05:42
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