Thank you for your questions.
pvns wrote:1) can we use F-IN-Box with absolutely no UI?
You should create a window, but you can hide it.
pvns wrote:2) What would the bitmap depth be in this configuration? 5:6:5, 32 bit, ??
f_in_box__control.GetBitmap() returns System.Drawing.Bitmap which is created by System.Drawing.Bitmap.FromHbitmap. So it's a GDI bitmap.
pvns wrote:3) We would really like to use RGB 24 bit. Can we tell F-IN-Box to provide this?
Using f_in_box__control.GetBitmap() you get a bitmap, than you can get pixels in this format using LockBits method:
Code: Select all
System.Drawing.Bitmap bmp = f_in_box__control1.GetBitmap();
const System.Drawing.Imaging.PixelFormat pixel_format = System.Drawing.Imaging.PixelFormat.Format24bppRgb; // if you need 24 bits; System.Drawing.Imaging.PixelFormat contains many others format
System.Drawing.Imaging.BitmapData bitmap_data =
bmp.LockBits( new System.Drawing.Rectangle( 0, 0, bmp.Width, bmp.Height ),
System.Drawing.Imaging.ImageLockMode.ReadOnly,
pixel_format );
System.IntPtr pPixels = bitmap_data.Scan0;
pPixels is a pointer that points to raw pixel data.
As a test you can create a bitmap copy using pPixels and pixel_format:
Code: Select all
System.Drawing.Bitmap bmp_copy =
new System.Drawing.Bitmap( bmp.Width, bmp.Height, bitmap_data.Stride, pixel_format, bitmap_data.Scan0);
bmp_copy.Save(@"C:\1.bmp");
bmp.UnlockBits(bitmap_data);