Page 1 of 1

images in dat files

PostPosted: June 26th, 2010, 5:17 am
by mcbulan
Hi all

I am developing a Delphi application (delphi 7) and using a lot of jpg and bmp files.
How can i store them in a dat file and call from that dat file on runtime.

Thanks

Re: images in dat files

PostPosted: June 26th, 2010, 5:45 pm
by mathgod
I think you are describing resource files (.res). There are a few tutorials that describe how to write a resource script (.rc) and compile it to a resource file (.res). I have created resource files that included bitmap images but I don't know how to do jpg files. Delphi has an RCDATA type that may be able to handle jpg but I know nothing about it.

Re: images in dat files

PostPosted: July 25th, 2010, 7:19 pm
by geowink
Are you sure you want to store them? I have found that storing the NAME of the jpg or bmp files is a lot better and more flexible. I put a location Folder in an INI file (c:\Delphi\MyPics) and that can be changed at any time so that graphics can be located in different locations.

George

Re: images in dat files

PostPosted: July 30th, 2010, 1:52 am
by Kambiz
I agree with George.
It's better to keep and organize the images in folders.