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.