Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

BITMAPINFO (Structures)
 
.
Summary
Contains information about the dimensions and color format of a DIB.
Summary
Defines the dimensions and color information for a DIB.

C# Definition:

[StructLayout(LayoutKind.Sequential)]
public struct BITMAPINFOHEADER
{
    public uint  biSize;
    public int   biWidth;
    public int   biHeight;
    public ushort   biPlanes;
    public ushort   biBitCount;
    public BitmapCompressionMode  biCompression;
    public uint  biSizeImage;
    public int   biXPelsPerMeter;
    public int   biYPelsPerMeter;
    public uint  biClrUsed;
    public uint  biClrImportant;

    public void Init()
    {
        biSize = (uint)Marshal.SizeOf(this);
    }
[StructLayoutAttribute( LayoutKind.Sequential )]
struct BITMAPINFO {
   /// <summary>
   /// A BITMAPINFOHEADER structure that contains information about the dimensions of color format.
   /// </summary>
   public BITMAPINFOHEADER bmiHeader;

   /// <summary>
   /// An array of RGBQUAD. The elements of the array that make up the color table.
   /// </summary>
   [MarshalAsAttribute( UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.Struct )]
   public RGBQUAD[] bmiColors;
}

VB Definition:

Public Structure BITMAPINFOHEADER
     Public biSize As Int32
     Public biWidth As Int32
     Public biHeight As Int32
     Public biPlanes As Int16
     Public biBitCount As Int16
     Public biCompression As BitmapCompressionMode
     Public biSizeImage As Int32
     Public biXPelsperMeter As Int32
     Public biYPelsPerMeter As Int32
     Public biClrUsed As Int32
     Public biClrImportant As Int32
Structure BITMAPINFO
   Public TODO
End Structure

User-Defined Field Types:

None.

RGBQUAD

Notes:

The unmanaged size of the structure must be set before the structure can be used by the API. This can be done by using the Init() call which uses the Marshal.SizeOf(this) method to get the appropriate size.

(Thanks to Mike I for the VB.NET definition).

None.

Documentation

http://msdn.microsoft.com/en-us/library/dd183376

Documentation
BITMAPINFO on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions