• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Saving images

Hi,

What is the best (practical) technique to save several images into one file ? And then read it again into an array of TImage ?
0
muis2002
Asked:
muis2002
2 Solutions
 
calinutzCommented:
What format are the images?
Did you consider saving them to a database? There are several database systems that accept images as fields (blobs).
As for saving them to a file... what do you mean? You could add them to a zip archive if you need this "several images into one file" to help you save space.
And as for reading them use the same zip archive (or whatever) to unpack the files. There are some components that can help you pack more files into one archive. Search on torry or ComponentSource or any other delphi oriented webpages.
  Good luck
0
 
BlackTigerXCommented:
probably to put them in a .zip file, there are very good freeware ZIP components like:

http://www.delphizip.net/
0
 
Slick812Commented:
Hello  muis2002, if you are not used to using TFileStream and writting and reading blocks of data, then this may seem less than easy, ,
I would use a TFileStream and the TBitmap method of SaveToStream, however if you save several bitmaps to file then you will need to have a way to organize your data (keep tract of where each bitmap data is in the file). . . there is a web page with information about creating multi-data files with delphi FileStream at -

http://www.angelfire.com/hi5/delphizeus/customfiles.html

you might read the section there called -
Using TGraphic Classes in a Multi-Data FileStream


ask questions if you need more help
0
 
muis2002Author Commented:
Thanks guys,

I think I will use zip file because it is easy. But too bad I cant unzip it into a memory.
0
 
BlackTigerXCommented:
I don't know if the component here
http://www.delphizip.net/

allows you to unzip to memory, but there ARE components that allow you to do that, you might want to search other Zipping components, I use XceedZip (not free) and works really well
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now