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
 AssignImage in DLL

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
spetric Posted - Jan 27 2015 : 17:26:43
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.
1   L A T E S T    R E P L I E S    (Newest First)
spetric Posted - Feb 02 2015 : 15:30:50
I've got it...the problem was with MGL library. AssignImage "EInvalidCast" led me to completely wrong direction. Sorry for "wrong alarm".