08-08-2013 07:18 PM
Hi,
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!
Regards,
Tom
Solved! Go to Solution.
08-08-2013 07:24 PM
What the purpose of these images? Can u explain more a bit?
08-08-2013 09:52 PM
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.
Mike...
08-09-2013 08:05 AM
They are pictures to show some instrument diagram. The purpose is mainly for GUI.
08-09-2013 08:09 AM
Hi Mike,
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.
Tom
08-09-2013 08:13 AM
Using a project library would be the answer, methinks.
08-09-2013 09:05 AM
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.
08-09-2013 09:57 AM
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?
Mike...
08-09-2013 10:02 AM
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.
Mike...
08-09-2013 10:06 AM
Thanks! I will try it.