Our design reflects an intentional preference for having only ONE file
format for storage of images within ABW files. We intended that
AbiWord would support other formats for the purpose of import and
export, but all would be converted to PNG for internal use, and
would always be PNG when saved to the ABW file itself.
Vector data is different, and should be handled differently, but
also by supporting only a single file format as our "native" format.
SVF looks like the obvious choice. Here again, supporting other
formats for the purpose of importing is cool.
The idea is that this choice of what our "native" formats should be
for storage would be essentially invisible to the user, just as the
details of the other parts of the ABW file format are. We're simply
choosing the file format which is technologically the best fit for
what we need.
Of course, any design is subject to review and change, particularly
now that Matt is more involved in the actual implementation than
I am. However, I just wanted to expose the background and thought
process of the original design.
--On Mon, May 24, 1999 at 09:23:29AM -0500, Jeff Hostetler wrote: > Return-Path: <owner-abiword-dev@abisource.com> > Received: (from majordomo@localhost) > by postman.abisource.com (8.8.7/8.8.7) id JAA28709 > for abiword-dev-outgoing; Mon, 24 May 1999 09:23:51 -0500 > Received: from sheridan (sheridan.abisource.com [206.185.0.49]) > by postman.abisource.com (8.8.7/8.8.7) with SMTP id JAA28700; > Mon, 24 May 1999 09:22:29 -0500 > Message-Id: <3.0.32.19990524092227.00ceb6c0@AbiSource.com> > X-Sender: jeff@AbiSource.com > X-Mailer: Windows Eudora Pro Version 3.0 (32) > Date: Mon, 24 May 1999 09:23:29 -0500 > To: "Robert G. Werner" <rwerner@lx1.microbsys.com> > From: Jeff Hostetler <jeff@abisource.com> > Subject: Re: Graphics in AbiWord files > Cc: abiword-dev@abisource.com, jeff@abisource.com > Mime-Version: 1.0 > Content-Type: text/plain; charset="us-ascii" > Sender: owner-abiword-dev@abisource.com > Precedence: bulk
> > images are stored within the document in a 'named data item in the data > section'. > within the flow of the document we then have 'by-name image references' to the > actual data. our internal native format is PNG, we store these base64-encoded > so that the file is not binary. > > we use the <data>...</data> section as a 'bucket' for, well, data -- data > that is > related to the document, but that is not inline content. we can then use > inline > markers that just reference them by name -- this let's us use an image in > several > places in a document and have them share one copy of the actual image bits.... > > for example (this is taken from abi/test/wp/abi_memo.abw): > > <abiword> > <section> > <p>Testing 1 2 3</p> > <p>An Image: <image dataid="D:\abi\images\a.png_1" props="height:1.00in; > width:1.00in"/></p> > <p>Testing 1 2 3</p> > </section> > <data> > <d name="D:\abi\images\a.png_1"> > iVBORw0KGgoAAAANSUhEUgAAAGAAAABdCAIAAADVHvQcAAATIElEQVR4nOxcW2xk2VXdrn54 > 2z1t73I/fOz0dN/peXQ1GkgpRIyRQDHSJGOJjFJCQbTQICykEAsh5C/wp7+gJBCyxID6I0L9 > ... > UugKSqErKIWuoBS6glLoCkrhHw+c1/CXIAPEAAAAAElFTkSuQmCC > </d> > </data> > </abiword> > > hope this helps, > jeff > ============================================================================ > ==== > At 10:11 PM 5/23/99 -0700, Robert G. Werner wrote: > >Matt and others, > > How does Abi store the graphic file in relation to the document that > >it is embeded in? > > In terms of HTML we would have the graphic be a separate file (as > far > >as the local viewer is concerned) but then integrated into the file when it > >is sent to the browser. Thus objects in different formats are stored on disk > >as separate files. But most Word Processors I've used stored the graphics > as > >part of the document file itself? This is obviously optimal from a user's > >point of view because when they want to share the file they only have to > copy > >one file. But it doesn't exactly make sense from the program's point of > >view. > > If this is a capability of XML and I'm just ignorant, then please > >let me know. Otherwise, I'm very interested in the method you all decided > >to use to to associate the graphics files with the AbiWord documents. > > > >Robert G. Werner > >rwerner@lx1.microbsys.com > >Impeach Conggress!! > > > >What does not destroy me, makes me stronger. > > -- Nietzsche > >
-- Eric W. Sink, Software Craftsman eric@abisource.com