Solution
Here are the possible solutions for the issue:
1. Rename the file
As the error message implies, make sure you do not use special characters such as ? or @. In order to make sure the characters are allowed is to rename the file to a simple name such as
image.
2. Check file path permissions
Another reason for this error can be image path permissions (if you have built an application). Make sure you have access to the path of the image. To make sure you have the permission, please run the application as Administrator. For more information or steps for the file permission issue, please refer to the following article:
Error 1 When Building Executable in LabVIEW.
3. Check the image bit depth
Make sure the image bit depth meets the requirements of the
Read JPEG file VI function. According to the VI documentation, valid values include 1, 4, 8, and 24 bits per pixel. To check whether your JPEG file suits the requirements, please follow the below steps:
- Open the JPEG file directory from the file explorer
- Right click on the JPEG file
- Select Properties
- Click on the Details tab
- Scroll down until you see the bit depth parameter. See the screenshot below:
The JPG file shown above can not be used by
Read JPEG file VI. In order to use it with LV it is recommended one of the following:
- Use third party software to change the bit depth of the image (e.g. Adobe Photoshop)
- Convert the JPEG file to PNG and use Read PNG file VI, as it supports 32 bit depth images.