I read and try that pure Magenta Color 255, 0, 255 in an i开发者_C百科mage is automatically transparent, but unfortunately failed, is there anything should I setup first?
Also I read and try include alpha in a PNG Image, the strange is when I used it on a project it's work, but not on the other, what is likely wrong with the code?
Please kindly reply, thank you
For Magenta to be transparent, look at the properties of your image file. Right click in solution explorer, properties.
There is an option there to specify the transparent color to be used (magenta by default).
Then, there is the rendering to consider. How are you drawing your texture? With SpriteBatch, it is automatic, but you may have sorting issues. Check the order in which you draw your textures and the SpriteSortMode.
精彩评论