views:

327

answers:

2

in any .net version

Format24bppRgb
Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components.

Format32bppRgb
Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. The remaining 8 bits are not used.
A: 

From what I can tell, due to the documentation if you are going to choose between those two, there is no point to go with the 32. However, my gut tells me that if you are building for desktop applications only, and you want to get the best range of colors for those with 32 bit color I would use either Format32bppArgb or Format32bppPArgb, as per the MSDN documentation these are going to provide more bits for color storage.

Mitchel Sellers
A: 

As you quoted from the documentation, Format32bppRgb will use the same 24-bits per pixel and the other 8 bits are not used, so why would you go with Format32bppRgb if it only wastes bits. It probably only exists for compatibility reasons. Format32bpp**A**rgb, however, does use the extra 8 bits for alpha channel. So between those choices, you should use Format32bppArgb if you need alpha channel or Format24bppRgb otherwise.

Are you using a Bitmap to draw something one a WinForm? If you are using a Graphics to draw on a Bitmap only to display the Bitmap, you might as well use a Graphics to draw directly into a control. You can wrap a Graphics around any control or form by using Graphics.From(control.Handle).

Lucas