Saving images

Posted on 2005-03-11
Medium Priority
Last Modified: 2010-04-05

What is the best (practical) technique to save several images into one file ? And then read it again into an array of TImage ?
Question by:muis2002
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 11

Expert Comment

ID: 13521819
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
LVL 13

Accepted Solution

BlackTigerX earned 300 total points
ID: 13522111
probably to put them in a .zip file, there are very good freeware ZIP components like:

LVL 34

Assisted Solution

Slick812 earned 100 total points
ID: 13522578
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

Author Comment

ID: 13523403
Thanks guys,

I think I will use zip file because it is easy. But too bad I cant unzip it into a memory.
LVL 13

Expert Comment

ID: 13568064
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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question