problem with transparency in custom icons.

  • Thread starter Thread starter Saeed
  • Start date Start date
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.
 
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.
 
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.
 
For the ribbon the transparency is stored in the alpha layer of the image.
Usually the best results are from PNG files.
 
Back
Top