images in dat files

Please discuss general Delphi programming topics here.

images in dat files

Postby mcbulan » June 26th, 2010, 5:17 am

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
mcbulan
Member
Member
 
Posts: 1
Joined: June 25th, 2010, 1:04 pm

Re: images in dat files

Postby mathgod » June 26th, 2010, 5:45 pm

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.
User avatar
mathgod
Junior Member
Junior Member
 
Posts: 35
Joined: December 15th, 2007, 4:36 pm
Location: Middle of New Mexico, USA

Re: images in dat files

Postby geowink » July 25th, 2010, 7:19 pm

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
George
geowink
Junior Member
Junior Member
 
Posts: 37
Joined: November 29th, 2005, 3:59 am
Location: La Grange, Illinois

Re: images in dat files

Postby Kambiz » July 30th, 2010, 1:52 am

I agree with George.
It's better to keep and organize the images in folders.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron