Proc Pictures

Dear all,
I would like a way of programmatically creating and using Proc Pictures as objects in a datafolder, so they can be loaded and unloaded with SaveData and LoadData on a per-run or per-user basis. Since I just posted on string and wave conversions, perhaps a Picture2String of the same data collected with the "Copy Proc Picture" button would do it. I currently copy all pictures by hand into a procedure file and load that with INSERTINCLUDE, but keeping them with all the other user data would be ideal.

Regards,
Patrick.
It would seem that if these pictures are NOT in procedures then they are not really Proc Pictures.

Since string variables can contain an arbitrary amount of binary data, you could in principal store picture data in a string. The problem is getting the picture data into the string and then later out of the string and into the global picture gallery.

The only way I can think of doing this is by using temporary files. Write your picture data to a file and then read that, using FBinRead, into a string.

Then when you need the picture, write the string data to a file and use LoadPICT to get the picture into the gallery.
I have loaded a couple of Igor functions onto the "Code Snippets" section that achieve the goal. They are called "String2Pict" and "Pict2String".