Alpha transparency...

sitajony

Active Member
Licensed User
Hello, I serched for get the code source for draw an image with the transparency and it works, I can now merge it in my executable but it doesn't work on every mobile... On HTC HD2 it's not working but on my old LG KS20 it's great...
As I can't test several time (the HTC HD2 is not the mine) I can't know exactly where is the problem but I suspect it's here:

B4X:
        [ComImport, Guid("327ABDA9-072B-11D3-9D7B-0000F81EF32E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        [ComVisible(true)]
        public interface IImage
        {
            uint GetPhysicalDimension(out Size size);
            uint GetImageInfo(out ImageInfo info);
            uint SetImageFlags(uint flags);
            uint Draw(IntPtr hdc, ref Rectangle dstRect, IntPtr NULL);
            uint PushIntoSink();
            uint GetThumbnail(uint thumbWidth, uint thumbHeight, out IImage thumbImage);
        }
The come import guid is maybe not the same on every mobile...
Anyone can tell me if there's an other way? I can also upload my source code if it's needed...

I know that there's a library made by eww245 (Alpha.dll) but I want merge it directly on my executable)

Thanks for your replies!
 
Last edited:

sitajony

Active Member
Licensed User
I succesful did my own lib for the transparency for merge it directly in my executable but strangly when I run my program it return on some devices (not all) "Invalid Cast" but the strangest it's that it return this error not when I run the function for draw the alpha image but when I show my form...
It's really weird...
I upload my code source for Alpha transparency and the EXE who works on some device (KS20 and Touch HD sure and HD2+Touch pro no)

The EXE just need the "img.png" image, no library required, it's directly merged...

Anyone can help me?
Thanks for your replie!
 

sitajony

Active Member
Licensed User
I found, in fact it need CF3.5, when it's older it return InvalidCast...
Now I can set the transparency and merge it directly on my EXE :)
I'll do a official library for this and say how merge it cause normaly you can't...
 
Top