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

Saving images


What is the best (practical) technique to save several images into one file ? And then read it again into an array of TImage ?
2 Solutions
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
probably to put them in a .zip file, there are very good freeware ZIP components like:

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 -


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

ask questions if you need more help
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.
I don't know if the component here

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

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