コード例 #1
0
        public void SaveImage()
        {
            Marshal.Copy(m_pRawBuffer, m_RawBuffer, 0, m_OutPutWindow.Width * m_OutPutWindow.Height);
            USBCameraAPI.ConvertBayer2Rgb(m_ImageBuffer, m_RawBuffer, m_OutPutWindow.Width, m_OutPutWindow.Height,
                                          m_kConvertType, m_LutR, m_LutG, m_LutB, false, m_kBayerType);

            BitmapData bmpData = m_bmpCurrent.LockBits(new Rectangle(m_OutPutWindow.X, m_OutPutWindow.Y,
                                                                     m_OutPutWindow.Width, m_OutPutWindow.Height),
                                                       m_kLockMode, m_kBMPFormat);

            Marshal.Copy(m_ImageBuffer, 0, bmpData.Scan0, m_OutPutWindow.Width * m_OutPutWindow.Height * 3);
            m_bmpCurrent.UnlockBits(bmpData);
        }