Try using imaqImageToArray() to get the image data into a 2D array. Please see the IMAQ Vision for LabWindows/CVI function reference for more details.
Once you have the pixel data in an array, use the ArrayToFile() function to write it to a file. This is a high level file IO function that handles opening, formatting, writing, and closing all in one function call. Alternately, you could use lower level file IO functions for more flexible control. You can find more information about file IO in the LabWindows/CVI Help under "Formatting and I/O".
Regards,
Brent R.
Applications Engineer
National Instruments