Results 1 to 2 of 2

Thread: MV Image Grabber

  1. #1
    Join Date
    Jun 2011
    Posts
    3

    MV Image Grabber

    Hello, I'm testing MV Development Kit and I've a little problem.

    I want to capture to memory an image with the MV Image Grabber filter.
    First of all I've checked the box on the filter, then I catch the MV_IMAGE_CAPTURE_END_EVENT and I can write this code:

    case MV_IMAGE_CAPTURE_END_EVENT:
    {
    Array miImagenEnArray;
    int width, height, bpp;
    m_ImageInfo.GetCurrentBitmapVB(out miImagenEnArray, out width, out height, out bpp);
    }
    break;

    That's fine! but I've seen that the array length is strange.
    It would be eight time more, and I can't load the image using Image.FromStream(...)

    What can I do to use this Array in my program?

    Thanks for your attention.

  2. #2
    Join Date
    Jun 2011
    Posts
    3

    Re: MV Image Grabber

    I could convert to file with this code:

    byte[] myImageByte = (byte[])myImageArray;
    Bitmap miBitmap = new Bitmap(width, height, PixelFormat.Format24bppRgb);
    BitmapData miBmpData = miBitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, PixelFormat.Format24bppRgb);
    Marshal.Copy(myImageByte, 0, miBmpData.Scan0, myImageByte.Length);
    miBitmap.UnlockBits(miBmpData);
    miBitmap.Save("D:\\Fotito.bmp");

Similar Threads

  1. MV Image Grabber does not write file if template used
    By GerardWeis in forum MontiVision Development Kit
    Replies: 1
    Last Post: June 20, 2011, 18:34:23
  2. PCI frame grabber
    By Datman in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: September 18, 2006, 10:12:47
  3. Video Grabber
    By Eee in forum MontiVision Development Kit
    Replies: 1
    Last Post: April 21, 2005, 10:08:05
  4. Grabber::newMemBufferCollection
    By rowkajjh in forum IC Imaging Control C++ Class Library
    Replies: 4
    Last Post: April 13, 2005, 16:05:17
  5. RGB image from frame grabber flipped!
    By Matt in forum IC Imaging Control C++ Class Library
    Replies: 2
    Last Post: May 28, 2004, 08:05:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •