Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
mouser
Posted - Feb 20 2013 : 08:55:59 I'm having trouble understanding the MergeAlpha parameter that is used in a few functions, including DrawObjectsToBitmap.
The actual problem I'm having is I have an object on top of a 100% transparent background, and when I DrawObjectsToBitmap, the resulting bitmap still has 100% transparency and so the objects are invisible.
So I guess what I'm ultimately looking for is a way to draw the objects to a background and "combine" in a reasonable way the transparency of the original background with the transparency of the objects being drawn onto it.
I can think of some laborious multiple step masking methods to do that if there is no easy way in ImageEn -- and if someone knows an easier way I'd love to hear.
But I'd still like to understand with the MergeAlpha option does as it's not clear to me.
Thanks!
6 L A T E S T R E P L I E S (Newest First)
mouser
Posted - Feb 22 2013 : 13:07:40 Hi Fabrizio,
I originally tried using CopyObjectsToBack, and it didn't work right -- however I cannot remember in what fashion it wasn't doing what I expected, and it may have been an error on my part.
Nevertheless, I am quite certain that I have fixed a few bugs in the ImageEn code related to this stuff -- I will email you my fixes (i've actually made some other "improvement" so it will be up to you what you want to keep).
Which was reported fixed by Fabrizio. As I am using the latest version (4.3) I wonder if in fact this is a bug which has not actually been fixed?
mouser
Posted - Feb 20 2013 : 09:22:38 A quick followup to explain the partial nature of my confusion.
When using the TIEBitmap.MergeWithAlpha function to draw one partially transparent bitmap or layer onto a fully transparent (alpha 0) background, the result is what I expected -- which is that the resulting bitmap becomes non-transparent where the bitmap is drawn.
But when using DrawObjectsToBitmap or CopyObjectsToBack with MergeAlpha option, the transparent backgrounds seem stay completely transparent, making the drawn objects completely invisible.