public void ScheduleFrameBitmap(Bitmap bmp, Int2[] positions, LocalizationJob[] jobInfo) { // public static extern int QTrkScheduleFrame(IntPtr qtrk, void* imgptr, int pitch, int width, int height, Int2* positions, int numROI, QTRK_PixelDataType pdt, LocalizationJob* jobInfo); BitmapData bmpData = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed); QTrkDLL.QTrkScheduleFrame(inst, bmpData.Scan0, bmpData.Stride, bmpData.Width, bmpData.Height, positions, positions.Length, QTRK_PixelDataType.U8, jobInfo); bmp.UnlockBits(bmpData); // QTrkDLL.QTrkScheduleFrame(inst, }