Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

saving bitmap using measurement studio

Hi,

 

I have a function as follows in C#:

 

public static void imaq2file(string dir, string file, VisionImage image)
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
image.WriteBmpFile(dir + file);
}

 

I have tested the rest of my program to see if this function is not the problem. I have used the imagetoClipboard function and tested that actual images are being passed. As far as I can tell only the above function does not work. I even used attrib -r +s drive:\<path>\<foldername> on folder (regedit ->explorer->usesystemsettings->1) to remove the readonly in win 7 from folder. I previously used it for labview's imaq saveimage VI.

 

Is there a workaround for this (besides using clipboard ->bitmap ->save), or am I using the WriteBmpFile function wrong? 

 

 

0 Kudos
Message 1 of 2
(5,289 Views)

Issue has been resolved this morning, no bug in the actual visionimage.writebmpfile() function. Thanks.

0 Kudos
Message 2 of 2
(5,257 Views)