Declare Function GetDIBits Lib "gdi32.dll" ( _ ByVal hdc As IntPtr, _ ByVal hbmp As IntPtr, _ ByVal uStartScan As UInteger, _ ByVal cScanLines As UInteger, _ ByVal lpvBits As IntPtr, _ ByRef lpbi As BITMAPINFO, _ ByVal uUsage As UInteger) _ As Integer Public Structure BITMAPINFO Public bmiHeader As BITMAPINFOHEADER Public bmiColors() As RGBQUAD End Structure Public Structure BITMAPINFOHEADER Public biSize As UInteger ' 構造体サイズ==40 Public biWidth As Integer '画像横幅 Public biHeight As Integer '画像高さ Public biPlanes As UInt16 ' ==1(Windows初期の名残) Public biBitCount As UInt16 'カラービット数(1, 4, 8, 16, 24, 32) Public biCompression As UInteger ' 圧縮コード(BI_RGB, BI_RLE4, BI_RLE8, BI_BITFIELDSのいずれか) Public biSizeImage As UInteger 'イメージのバイト数 Public biXPelsPerMeter As Integer '水平解像度 Public biYPelsPerMeter As Integer '垂直解像度 Public biClrUsed As UInteger 'カラーテーブルの数 Public biClrImportant As UInteger '重要な色の数 End Structure Public Structure RGBQUAD Public rgbBlue As Byte Public rgbGreen As Byte Public rgbRedas As Byte Public rgbReserved As Byte End Structure