05-01-2009 01:58 AM
hi all,
On my front panel I've few controls pictures containing photos (JPG type) . The user can select the photo he wants using the classic file dialog box.
Usally I use the config files VI's to save the control values from one run to another one. In the config files VIs, I use the polymorphic "write Key.vi" wich accept only booean, I32, U32, path, and string dada type, but no picture !
I've tried the "flatten to string" fonction (picture --> flatten to string --> writekey.vi) , no broken wire but the conversion is very very too long and to heavy (20Mo a key!).
another way, would be to write in a xml file, I've also tried but I've always get the 1104 error: No end tag was found for an XML start/end tag pair.
can someone help me.
what is the best way for retrieving controls pictures with photos
05-01-2009 04:37 AM
05-07-2009 04:13 PM
Hi GerdW
Many thanks for your quick answer. Always happy to get advises from fellow programmers.
You suggest to use the "path" input of the "write key.vi" (configuration file utilities) to retrieve photos that a user would have selected in a previous run. Could be a good solution in a number of applications but what I would like to do is like in a excel or word file. Once a photo has been embeded in one xls file for ex., I find it back each time i open this xls file, even if the original photo's file has been deleted or if my application runs on another computer.
xml file looks interesting for that purpose (i mean used as config file). I can easily store in a xml file a labview picture (like a colored rectangle e.g.) but when i try with a photo (wich is a also a picture) labview returns always the error 1104.
How to fixe this error, or maybe there is another way to store photos in a config file without passing through xml,
kind regards.
05-07-2009 04:26 PM
Hi pascalou,
error# 1104 means "couldn't find end tag" - it seems the embedded picture is too big for LabView. I don't have the XML functions available, so I can't check them for any size restrictions...
What about using your own file format? How much information do you need to store?