CreateDIBSection from GDI32?

  • Thread starter Thread starter gregory_may
  • Start date Start date
Gregory,
where do i find the correct definition for:
BITMAPINFO
A nice newsgroup to ask this is

microsoft.public.dotnet.framework.drawing

I hope you find your answer soon

Cor
 
Hello,
where do i find the correct definition for:
BITMAPINFO

Try this:

~
<StructLayout(LayoutKind.Sequential)> Friend Structure BitmapInfo
Public bmiHeader As BitmapInfoHeader
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public
bmiColors() As RGBQuad
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure
BitmapInfoHeader
Public biSize As Integer
Public biWidth As Integer
Public biHeight As Integer
Public biPlanes As Short
Public biBitCount As Short
Public biCompression As Integer
Public biSizeImage As Integer
Public biXPelsPerMeter As Integer
Public biYPelsPerMeter As Integer
Public biClrUsed As Integer
Public biClrImportant As Integer
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure RGBQuad
Public rgbBlue As Byte
Public rgbGreen As Byte
Public rgbRed As Byte
Public rgbReserved As Byte
End Structure
~

I hope it helps

Roman
 
Thanks!!!


Dragon said:
Hello,


Try this:

~
<StructLayout(LayoutKind.Sequential)> Friend Structure BitmapInfo
Public bmiHeader As BitmapInfoHeader
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public
bmiColors() As RGBQuad
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure
BitmapInfoHeader
Public biSize As Integer
Public biWidth As Integer
Public biHeight As Integer
Public biPlanes As Short
Public biBitCount As Short
Public biCompression As Integer
Public biSizeImage As Integer
Public biXPelsPerMeter As Integer
Public biYPelsPerMeter As Integer
Public biClrUsed As Integer
Public biClrImportant As Integer
End Structure

<StructLayout(LayoutKind.Sequential)> Friend Structure RGBQuad
Public rgbBlue As Byte
Public rgbGreen As Byte
Public rgbRed As Byte
Public rgbReserved As Byte
End Structure
~

I hope it helps

Roman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top