Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
13 ratings:
 3.76 out of 5   

What Image File Types Are Supported By The "Import Picture From File..." Option In LabVIEW?

Primary Software:
Primary Software Version: 4.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

I am trying to use Edit » Import Picture From File in LabVIEW to copy a picture onto my front panel or control. When I browse to the file, I receive an error message:

LabVIEW could not import the picture. Possible reasons include:
-Corrupt file or invalid picture type.
-File used by another application.
-Not enough memory

In versions of LabVIEW prior to 5.0, the error message may be Failure: E:\lv45\mgsource\image.c line 8209.

If the file you are trying to import is a *.jpg or a 16-bit *.bmp file, you will receive this message. LabVIEW can import 24-bit *.bmp, *.gif, and *.wmf files, but other file formats are not supported by the import function.

If you have a file that you would like to paste onto your front panel that is an unsupported format, there are two options:
  1. Copy the image to the Windows clipboard (using a method other than Edit » Import Picture From File which copies images to the LabVIEW clipboard). Then use Edit » Paste to copy the image onto the front panel, or right-click on the picture control, and select Import Picture to copy the image into a control.
  2. Use another application, such as Microsoft Paint, to save the file into a supported format, and then import it using Edit » Import Picture From File. Then use Edit » Paste to copy the image onto the front panel or right-click on the picture control and select Import Picture to copy the image into a control.
There are some other factors to consider when importing an image to your front panel; one is file size. The chief benefit of *.jpg and *.gif files is that they are compressed files, and as a result, they are smaller than file types such as *.bmp and *.wmf. If file size is an issue, the best file format to use is *.gif. The only difficulty that you may encounter with *.gif files is that due to the nature of the file formatting, once they are pasted into LabVIEW, they cannot be resized. If you need the ability to resize your image, you must use either a *.bmp or *.wmf file, or paste the *.gif image into the diagram using Edit » Paste directly from the Windows clipboard rather than importing the image first. See the KnowledgeBase 0YJFHNFR linked below for more information on file size due to pasted images.

Note: LabVIEW 3.1.1 for Windows 3.1 can only paste bitmap graphics directly from the Windows clipboard. Any other graphics must be brought in using the Edit » Import Picture From File. Importing the image contains conversion routines for converting graphics of varying types to bitmaps for subsequent pasting.

Note: LabVIEW 4.0 on Windows 95/NT can copy only metafiles and bitmap images from both the LabVIEW and Windows clipboards.

Related Links:
KnowledgeBase 0YJFHNFR: Imported Bitmaps for Custom Controls Seem Excessively Large under LabVIEW, Windows


Report Date: 06/26/2002
Last Updated: 08/16/2011
Document ID: 2MPCQCFP

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