Bitmap with mask/transparency - page 2

 
Grzegorz Korycki:

I know this subject is very old, but I may have some simpler tip for that, which would help me a lot if it was here, when I first found this thread.

Save your transparent arrow as transparent PNG, then use the free XnView tool to convert it to 32-bit BMP (that is RGB + alpha channel).

I have found transparent BMP exported in Corel and some other software not usable with MQL, while XNView 32-bit BMP exports always work.


Also the image has to be included as a resource for some reason. Transparency stops working if you change the path to load it from the disk instead. Example where transparency works:

And here it won't:

Thank you for that, I was looking to convert a jpg I have into BMP, but the file I put on the chart is all black, no pic showing.

So, I used your suggestion but you did not explain how to convert to 32-bit BMP using XnView tool. I only see "Save As..." is that it? But it doesn't say 32-bit there, only have Windows BMP option, or am I wrong?

 

Hello,

i can NOT get a transparent background bitmap (32 bit with alpha channel (used xnView for this))  showing up on MT4 chart.

Using canvas class is not loading the bitmap at all.

Going classical way, is loading the bitmap, but not showing up.


Is it possible at all ? If yes, what is the secret ?

Thank you

 
chinaski:

Hello,

i can NOT get a transparent background bitmap (32 bit with alpha channel (used xnView for this))  showing up on MT4 chart.

Using canvas class is not loading the bitmap at all.

Going classical way, is loading the bitmap, but not showing up.


Is it possible at all ? If yes, what is the secret ?

Thank you

   

Files:
Fon.mq4  4 kb
iCanvas.mqh  49 kb
80.zip  10 kb
 
Nikolai Semko:

   

Hello Nikolai,

thank you for sharing this.

Need to dig into this

Reason: