Vive l art: Importing Pictures


Vive l'art: Importing Pictures

You can paste pictures right into LabVIEW and include them on your front panel (or block diagram, but this is not a common practice). For example, you might want to make a block on your instrument that has your company logo (see Figure 17.5). Or you might want to be a little more elaborate, like adding piping and valve pictures to represent some process control loop (you can actually make your valve pictures Boolean controls, as explained in the next section).

Figure 17.5. Front panel with a company logo that was imported into LabVIEW


To import a picture into LabVIEW, use the Edit>>Import Picture from File . . . dialog to select the image file and load it into LabVIEW's clipboard.

In Windows and Mac OS X, you can also import images into LabVIEW by copying a picture directly from another application in which it's open. However, this will cause the image to pass through the operating system's clipboard and is not advisedthere is a potential for loss of information, reformatting, or distortion of the image. It is recommended that you always use the Edit>>Import Picture from File . . . mechanism for importing images into LabVIEW.


The following are lists of supported image formats, for each platform:

All Platforms support these formats:

  • PNG, including support for transparency

  • GIF, including support for transparency and animation

  • JPG

On Windows, it supports these additional formats:

  • BMP (Windows Bitmap File)

  • CLP (Microsoft Windows Clipboard)

  • EMF (Enhanced Meta File)

  • WMF (Windows Meta File)

On Linux, it supports these additional formats:

  • XWD (X Window System Dump)

In Windows and Mac OS X, you can bypass the Edit>>Import Picture from File . . . menu option by simply dragging and dropping a supported image type from File Explorer (Windows) or Finder (Mac OS X) onto a VI's front panel. The image will then appear on the front panel as a decoration.


In addition to blank areas on the front panel (or block diagram), another place where you can put pictures is in a picture ring (Pict Ring) or a text and picture ring (Text & Pict Ring), available from the Modern>> Ring & Enum palette. Two examples are shown in the following illustration (see Figures 17.6 and 17.7). Using the picture rings allows you to get very creative in presenting the user with a customized graphical set of options that you can index and track.

Figure 17.6. Picture ring


Figure 17.7. Text and picture ring


To add a picture to a picture ring, first import your picture (using the Edit>>Import Picture from File . . . menu option) to the clipboard. Then choose Import Picture from the pop-up menu on the Picture Ring control. To add more pictures, choose either Import Picture After or Import Picture Before from the pop-up menu. Choosing Import Picture overwrites the current picture (see Figure 17.8).

Figure 17.8. Importing a picture into a picture ring


In Windows and Mac OS X, you can bypass the Edit>>Import Picture from File . . . menu option by simply dragging and dropping a supported image type from File Explorer (Windows) or Finder (Mac OS X) onto a Picture Ring control. The image will replace the current image. Pop up on the picture ring and select Add Item Before or Add Item After to create a new "blank" item.





LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net