32-bit Bitmap

If you're creating toolbars and menus for Visual Studio, the only way to get a crisp icon for the item is to use a 32-bit bitmap, which is a 24-bit bitmap plus an 8-bit alpha channel. Unlike lower bit levels, 32-bit bitmaps support transparency which prevent your icons from looking like a box. Worse still, I discovered that using 24-bit bitmaps creates artifacts in the form of little black dots when rendered.

Unfortunately, unless you have a license to Photoshop, you may discover that none of your tools create 32-bit bitmaps. I don't have a Photoshop license at work so I use Paint.NET to do my graphical work (which is great in most of my scenarios). Here's what the Paint.NET author had to say about why 32-bit bitmaps aren't supported: "GDI+ just refuses to cooperate in allowing me to do that."

Luckily, I found a free tool, AlphaConv, that will convert png files to 32-bit bmp files. My process is as follows.

1) Create a png in Paint.NET with 32-bit Bit Depth.

2) Drag and drop the png into AlphaConv with Target format set to .bmp.

3) Copy the resulting bmp file to my project directory, compile my application.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Thursday, May 21, 2009 10:46 AM

Comments on this post

# re: 32-bit Bitmap

Requesting Gravatar...
Huh, weird Paint.NET author, saving a 32-bit BMP file, given a buffer of RGBA pixels, takes (and I'm counting them) only 40 lines of C++, and that is verbose code with comments and stuff. I can't imagine it being harder in C#.
Left by umyeah on Nov 27, 2009 12:18 PM

# re: 32-bit Bitmap

Requesting Gravatar...
yeah very odd he doesn't add support for that, bitmaps are uncompressed raw buffers and it would seem they would be one of the easiest formats to add support for
Left by isecondthat on Dec 11, 2010 11:06 PM

# re: 32-bit Bitmap

Requesting Gravatar...
he experience of others, and a series of verification, to do something closer to interpretation. Of course, these are not 100% correct, but in the time I retro air jordans felt that I could say that there were seven, eight grasp, only reference to it: <br> <br> first number: refers to the upper color, it is worth noting that is not necessarily the proportion of buy jordan 3 that color is the main multi-color, many colors are...
Left by buy jordans on Jul 02, 2011 12:41 AM

# re: 32-bit Bitmap

Requesting Gravatar...
For editing 32-bit bitmaps for toolbars and ribbons in VS 2010 i needed a tool to edit bitmaps with alpha channel. I found PixelFormer at
http://www.qualibyte.com/pixelformer/
which fulfills my needs. Especially it has no size constraint (such as 256*256 pixel found in IcoFx Portable).
Left by kanalbrummer on Jul 28, 2011 3:54 AM

Your comment:

 (will show your gravatar)