Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 rating:
 1 out of 5     Rate this Document

NI-IMAQ Invalid Image Type Exception in C#

Primary Software: Driver Software>>NI-IMAQ
Primary Software Version: 3.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When using NI-IMAQ in C#.NET, why do I keep getting an invalid image type exception even though I am acquiring images that have compatible image types for the function that I am calling?

Solution:
When an image buffer is created in C#, it will not automatically adapt to the type of the image placed in the buffer.  If the image type of the image buffer is not correct for the function you are calling, an invalid image type exception will occur even if the acquired image type is compatible with the called function. In order to resolve the issue, the image buffer's image type must be specified before images are acquired in a grab or snap.

Related Links:
Drivers and Updates: Vision Acquisition Software 8.6
Knowledgebase 3FBELMKZ: Do NI-IMAQ and NI Vision Support Microsoft Visual Studio .NET?
Developer Zone Example Program: Snap and Grab with NI-IMAQ for IEEE 1394 Cameras in C#
Image Acquisition/Vision Support

Attachments:





Report Date: 03/05/2008
Last Updated: 03/17/2009
Document ID: 4J4DP5DT

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit