01-04-2010 06:27 AM
hi all,
I am having difficulty in reading the .jpg file using windows vista as a operating system.
When I am using read jpeg file vi I am getting an error that file path may contain expression not supported by OS.
But the path I am provided is like C:\users\desktop\abc.jpg
I dont know what is the correct file path format for the jpeg file to read in vista..
plz guide me ...
01-04-2010 08:06 AM
I doubt that the path is correct, normally the path would be:
C:\users\%username%\desktop\abc.jpg
Try to use the File dialog function for the path.
Ton
01-04-2010 09:54 PM
thanks for the reply,
but I am using file dialog box only to specify a path from where i can browse to the required file path.
Also when i am using the same path in the run option from the start menu of windows image can be seen which means that path is proper,
so I am not getting where the exact problem is.
01-04-2010 10:46 PM
I find that hard to believe.
Which version of Vista are you using? As Ton said, the username is a part of the path.
Can you post the VI so we can see how you are specifying the path?
Have you tried reading the file from another location such as the c:\ drive (assuming you have the user rights to place the file there) or the documents directory to see if that works?
01-05-2010 12:56 AM
shruthi,
can you verify once that the "abc.jpg" file is actually a "jpg" file and not a .png or .bmp file?
There are chances that the file extension might have changed and the the LV vi can not read it
Guru
01-05-2010 01:37 AM
Guruthilak wrote:shruthi,
can you verify once that the "abc.jpg" file is actually a "jpg" file and not a .png or .bmp file?
There are chances that the file extension might have changed and the the LV vi can not read it
Guru
That's another good option.
Could you show your VI and/or upload the jpg?
Ton
01-06-2010 10:57 PM
yes,the file which i m using is of .jpg only.
here i m attching the vi along with the image file.
when same image file was converted into .png format and i replaced "read jpeg file"function by "read png file" function i was able to see the image.
01-06-2010 11:26 PM
I'm using LV2009f2 on Vista Home Premium. I saved your jpeg to my desktop. I used the browse button on the file path control and selected the file. I ran the VI. The picture loaded in the picture indicator just fine without any errors. See the attached .png.
What are you doing differently? Put an indicator on the boolean that is coming out of the check if file or folder exists.vi to see if the True or False case of your Select function is executing.
As you can see, the path includes my username as part of the file path to my desktop.
Can you post a screenshot of your front panel after you run it?
03-05-2010 01:36 PM
I have the exact same problem on a Vista machine. The user path is irrelavent. I think this is a bug:
Import the jpeg into powerpoint and save as jpeg with a different name -> same error: illegal character in path
Import the jpeg into poweroint and save as png with a different name in same directory. Change read vi to "read png file" works fine!
Ok NI, what's going on?
03-05-2010 02:57 PM - edited 03-05-2010 02:59 PM
What version of Windows Vista and what version of LabVIEW are you using?
You say you imported the picture into powerpoint, and did a Save as jpeg. How do you do a save as jpeg with an imported picture in powerpoint? I don't know of any Save As for handling imported picture objects in Powerpoint.
Unfortunately, the original poster never bothered to come back and give us any more information and answer the questions I asked.