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
 AssignImage in DLL
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

spetric

Croatia
308 Posts

Posted - Jan 27 2015 :  17:26:43  Show Profile  Reply
Hi,

when I try to perform image assign in DLL, program throws an error:
"invalid type cast" (EInvalid Cast):

outputBitmap->AssignImage(inputBitmap);

It seems there is a problem with AlphaChannel, because it's created in very peculiar way, just by calling property.

When I try to manually create output image from input image,
DLL could not be executed:


TIEBitmap *outputBitmap = new TIEBitmap();
outputBitmap->Width  = inputBitmap->Width;
outputBitmap->Height = outputBitmap->Height; 
outputBitmap->PixelFormat = outputBitmap->PixelFormat;
if (inputBitmap->HasAlphaChannel)
   outputBitmap->AlphaChannel; 


With this block of code, DLL could not be loaded at all and some strange "system exception" occurs (it crashes also a host program).
When two last lines of code are omitted, DLL is loaded and it works ok. Any clue?

Edit: I've moved this code block from some c unit to class (form)
ans it works ok, but AssignImage does not. It seems that it can not perform image assign in DLL when inputBitmap comes from host program.

spetric

Croatia
308 Posts

Posted - Feb 02 2015 :  15:30:50  Show Profile  Reply
I've got it...the problem was with MGL library. AssignImage "EInvalidCast" led me to completely wrong direction. Sorry for "wrong alarm".
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: