On 07/16/03 20:26, pcg@xxxxxxxx ( Marc) (A.) (Lehmann ) wrote: > - maybe there is a need to have a gimp-specific file format, especially > when you want to store the image data in a non-trivial way to speed up > access. > - maybe there is a need to have a nicely defined exchange format for > complex images (xml + data is nicer than the ad-hoc design of miff). If we really are in brainstorming mode here, following the suggestions listed above, how about a format something like the following, which is essentially just an XML preamble, followed by raw binary data: <gimp type="image" version="1.0"> <name>My Example Image</name> <author>Christopher W. Curtis</author> <description>A big, purple, E</description> <date format="logical">2003/07/18</date> <copyright>2003 FSF, All Rights Reserved</copyright> <layer name="Background" mode="overlay" opacity="0%"> <dimensions width="800" height="600" /> <origin x="0" y="0" /> <data offset="2000" format="RGBA" bpp="12" /> </layer> [...] </gimp> \000\000\000 [...] \000 until file offset=2000 <raw binary data> The nice thing about this is that it should be fully parseable by XML parsers (up until the first NULL [1 is required, the rest are optional buffer space for those too lazy to do math]), it is completely human readable and very descriptive, highly extensible, and fully functional. You can add an "encoding=" or "compression=" option, specifying "none", "bzip2", or whatever, or even "format=" and "jpg" (at the layer mode, making the dimension, etc. tags optional; you'd still need data offset, etc.) The other nice thing is that you can just read the header, and load the rest of the layers on demand (for other 'preview' tools or what have you), and it can be used for other items as well. Instead of "type=image" you can have "type=brush", etc. Maybe even add an attribute like <thumbnail format="jpg" offset="12580" />. Chris