The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Store Images and String

Hi Guys,

I need to roll my own file format.

Need to store Images in JPG, gif, etc... format  as well as  store  String data..



currently useing a Hashtable to store the info . and then serializing to a file..

I'm wondering if this could backfire.


any refference tutorials on how I can setup my own fileformat to store data in with imagse. and easly read the data and images back out?  similar to hashtable structure..
Roller
Friday, September 22, 2006
 
 
are you aware jpegs can contain text?
G Jones
Saturday, September 23, 2006
 
 
Using Delphi and VCLZip I did something similar, by storing image files and text files together in a .zip file (with a different extension). At runtime you just open the .zip file and extract the image / textual information.

HTH
Aaron
Aaron DC Send private email
Saturday, September 23, 2006
 
 
+1 for ZIP files, or +0.5 for any other kind of compound file format, -1 for invent your own file format.
Sunil Tanna
Saturday, September 23, 2006
 
 
Sunil Tanna,

"-1 for invent your own file format."

There are some legitimate reasons to invent one own's file format, but this is an art in itself -- there are just too many things that must be considered. If one does not have any experiences with file formats at all -- and the OP doesn't seem to -- I strongly recommend to not do it and add another -1.
Secure
Saturday, September 23, 2006
 
 
Roller,

why do you need (or think to need) to roll your own file format?
Secure
Saturday, September 23, 2006
 
 
You can use OLE structure storage. The structural storage is a "file directory within file" with each stream can be indenpendently seeked, read and written.
Burner
Sunday, September 24, 2006
 
 
You should look at the EXIF format http://www.exif.org (which is what most JPEGs are encapsulated in) it already provides the ability to put text along with the image.

Tuesday, September 26, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz