Home > Software engineering >  Createdibsection how to use
Createdibsection how to use

Time:11-20

Bitmap_Info. BmiHeader. BiSize=Len (bitmap_Info bmiHeader)
Bitmap_Info. BmiHeader. BiPlanes=1
Bitmap_Info. BmiHeader. BiBitCount=8
Bitmap_Info. BmiHeader. BiCompression=0
Bitmap_Info. BmiHeader. BiXPelsPerMeter=& amp; HB12
Bitmap_Info. BmiHeader. BiYPelsPerMeter=& amp; HB12
Bitmap_Info. BmiHeader. BiClrUsed=0
Bitmap_Info. BmiHeader. BiClrImportant=0
Bitmap_Info. BmiHeader. BiWidth=wilB. Iwidth
Bitmap_Info. BmiHeader. BiHeight=wilB. Iheight
Bitmap_Info. BmiHeader. BiSizeImage=CLng (iwidth) * CLng (wilB. Iheight) * bitmap_Info bmiHeader. BiBitCount/8
Bitmap_FH. BfType=& amp; H4D42
Bitmap_FH. BfOffBits=Len (bitmap_FH) + Len (bitmap_Info. BmiHeader) + 1024
Bitmap_FH. BfSize=bitmap_FH. BfOffBits + bitmap_Info. BmiHeader. BiSizeImage
Memhdc=CreateCompatibleDC (Form1. HDC)
HBitmap=CreateDIBSection (memhdc bitmap_Info, DIB_RGB_COLORS, hOldPen, nu_ll, 0)
'CopyMemory ByVal hOldPen, bitmap_Info bmiColors (0), and 1024
CopyMemory ByVal hOldPen, wilB. Bcolors (0), bitmap_Info. BmiHeader. BiSizeImage
SelectObject memhdc, hBitmap
BitBlt Form1. HDC, x, y, 48, 32, memhdc, 0, 0, SRCCOPY
Form1. Refresh
Open the App. The Path + "\ \ PIC" + CStr (picNum) + ". BMP "For Binary As # 1
Put # 1, and bitmap_FH
Put # 1, and bitmap_Info
Put # 1, wilB. Bcolors
Close # 1
DeleteObject hBitmap
DeleteDC memhdc
Photos are correct, but it was able to show,,,, who know where is wrong
  •  Tags:  
  • API
  • Related