Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing images in a VFP

Status
Not open for further replies.

foxprogram

Programmer
Aug 31, 2004
28
0
0
HU
My question is :How can I store images which are now part of the compiled executable (marked as Included) ?
Should I put them into a .dll, or sg like this ?

Sorry but I have no VFP book, and I am just a beginner! :)
 

Can you explain what you want to do?

If you have images compiled into an executable, aren't they already stored? How many images?

Best policy is the leave the images outside of the executable and point to them, rather than storing them either in a table or an executable.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Every images linked into the executable now.
And the result is that the .EXE file is a fat two and a half megabytes :(

I should use only few hundred kilobytes executable file plus a large DLL or sg like that.
 
I should use only few hundred kilobytes executable file plus a large DLL or sg like that.


I repeat my suggestion:
myself said:
Best policy is the leave the images outside of the executable and point to them, rather than storing them either in a table or an executable.

I am not sure how you would store an image in a DLL, binary information perhaps?
What is an 'sg'?


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
In Clipper 5.3 (grrr) there was a file with extension .BML, and it used to store images, text etc. in one file.
(The name of this file was egal to the executable)
This file loaded into memory when the executable start, and then I was able to point the images, and put them onto the screen.

I got nothing similar in VFP. :(
I tough that a .DLL would be a good alternative to store images in one file.
I cannot leave them alone, it is an important strategic question! :)
 

Then I would suggest (reluctantly) to store the binary information of the images in a binary memo.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Hi foxprogram,

Unfortunately VFP does not support embedded files within seperate files, like resource DLLs.

But what do you fear, if you get a large executable?
At least inintially you also need to supply the runtime files, which also make up several megabytes. 1.5 MB is rather small. For distribution use the Installdhield Express version you got with VFP7 or above and zip that setup.exe.

If you exclude pics into a separate file, like a table, you need to export the pictures to disk at least temporarily to have them available eg with the Picture property of an image control, as there is no way to tell an image control to use some embedded picture or icon of a dll or other file. Only with VFP9's PictureVal property you'd have the chance to just set that to a binary memo field (or blob) with the picture stored within. This has some bloating effect on the size of that table compared to the size of the picture files alone.

If you want a smaller exe you could use Konxise, which compresses and also encrypts the binaries.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top