Exemple #1
0
 public static extern int GetDIBits([In] IntPtr hdc, [In] IntPtr hbm, uint start, uint cLines, IntPtr lpvBits,
     ref BitmapInfo lpbmi, DIBColorTable usage);
Exemple #2
0
 /// <summary>
 /// The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into
 /// a buffer as a DIB using the specified format
 /// </summary>
 /// <param name="hdc">Handle to the device context</param>
 /// <param name="hbm">Handle to the bitmap. This must be a compatible bitmap (DDB)</param>
 /// <param name="start">Specifies the first scan line to retrieve</param>
 /// <param name="cLines">Specifies the number of scan lines to retrieve</param>
 /// <param name="lpvBits">Pointer to a buffer to receive the bitmap data. If this parameter is null, 
 /// the function passes the dimensions and format of the bitmap to the BITMAPINFO structure pointed to
 /// by the lpbmi parameter</param>
 /// <param name="lpbmi">Pointer to a BITMAPINFO structure that specifies the desired format for the DIB data</param>
 /// <param name="usage">Specifies the format of the bmiColors member of the BITMAPINFO structure.</param>
 /// <returns>If the lpvBits parameter is non-null and the function succeeds, the return value is the number of scan lines copied from the bitmap</returns>
 public static int GetDIBits([In] IntPtr hdc, [In] IntPtr hbm, uint start, uint cLines, IntPtr lpvBits,
     ref BitmapInfo lpbmi, DIBColorTable usage)
 {
     return Native.GetDIBits(hdc, hbm, start, cLines, lpvBits, ref lpbmi, usage);
 }