Hi All,
I'm developing in a project an image acquisition integrating a DLL functions supplied by hardware manufacturer. I'm not an expert and without help I'm not able to go ahead.
Once I get the pointer to bitmap (pBits) and pointer to Bitmapinfo (pBitmapInfo) I've no idea how to draw onto the screen the image. In the V.C. example supplied by the manufacturer is used the SetDIBitsToDevice method, I really don't know what is the easiest way to do - integrate this in LabVIEW.
Following the V.C. example code:
// pointer to bitmap
void* pBits;
BITMAPINFO*
pBitmapInfo;
// get bitmap from MCDAQ
MCDAQ_ACF_IMAGE_GET_BITMAP(hACF,
&m_bmp_isize_x, &m_bmp_isize_y, &pBits, &pBitmapInfo))
// now pBits (4 Bytes) and pBitmapInfo (4 Bytes) contain
the pointers to the bitmap and you can draw it!
// copy bitmap 1:1 to
screen
::SetDIBitsToDevice(pDC->m_hDC, ofs_x, ofs_y, m_bmp_isize_x,
m_bmp_isize_y,
0, 0, 0, m_bmp_isize_y,
pBits,
pBitmapInfo, 0);
// or stretch bitmap to
screen
::StretchDIBits(pDC->m_hDC, m_bmp_ofs_x, m_bmp_ofs_y, m_bmp_size_x,
m_bmp_size_y,
0, 0, m_bmp_isize_x,
m_bmp_isize_y,
pBits, pBitmapInfo, DIB_RGB_COLORS, SRCCOPY);
}
Many thanks in advance
M.S.