I have picture files need to be used by a LabVIEW program. When building a standalone program these picture fies can be includded in a support directory. I wonder is it possible for these files to be part of the labview standalone program so I only need to distribue one program instead of a program with support directories? Thanks!
Solved! Go to Solution.
Technically the answer is no, BUT depending on the size of the image, it might be possible to fudge it.
If the file isn't huge, read the file in and store is as a binary array in a constant that is on the block diagram of a VI that can be loaded dynamically.
Now, when your program launches, have it first check to see if the image file exists. If it does not, the program loads the dynamic file, and writes the contents of the constant to a file with the correct name and extension.
They are pictures to show some instrument diagram. The purpose is mainly for GUI.
Thanks for your reply. It is sure a solution to solve the problem although I expect there could be a easier way offerred by the applcation builder.
Using a project library would be the answer, methinks.
I just created the same thing (a test interface with pics of the wiring setup). Just open your picture in any picture control, right-click > Data Operations > Copy, then paste it into a picture control constant in your VI. I created an array of them so that the operator can step through the pics as he works. Of course your executable will grow with every JPG you add to it.
The problem is that the application builder can't include non-LV file in the exe. It can include such files as part of the build - as you have already noticed. In addition, when you create an installer, the installer bundles up everything associated with the application into a single installation executable that puts all the files where they need to be on the target machine. Perhaps that is what you are wanting to do?
The problem with JPGs is that they can produce artifacts (visual noise) dure to the compression that it uses. Depending on the image, PNGs can be just as small (or smaller) with far better clarity.
Also, if you are planning to put graphics on the front panel -- which is also a good idea -- be sure that the images don't overlap each other. Overlapping control can have a large negative impact on performance.