problem with transparency in custom icons.

S

Saeed

I am facing problem while adding custom icons to CommandBarButton in toolbar.
I have icons which are in png format with transparency. For showing them I
have created mask with black and white pixels and set button.picture to png
icon and button.mask to the mask png. I am able to see the icons.
The problem here is with pixels in icon which are semi-transparent (alpha>0
but <255) like shading in the boundary. What should be
the color of mask for those pixels. If I make it white, I cant see those
pixels. If I make it black, those pixels look in a dark color most likely
because the background has now become visible.
Are the semi-transparent pixels allowed in the icon.
 
K

Ken Slovak - [MVP - Outlook]

Semi-transparent pixels aren't supported. In fact the spec for a command bar
button image is 16x16 pixels with 8-bit color in a BMP file. Anything else
may or may not display correctly.
 
S

Saeed

Are transparent and semi transparent pixel images supported as Ribbon button
icons, as I do not see any mask kind of thing for adding transparency in
ribbon icons. I am adding ribbon button using xml file and providing icon
using getImage callback.
 
K

Ken Slovak - [MVP - Outlook]

For the ribbon the transparency is stored in the alpha layer of the image.
Usually the best results are from PNG files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top