On Monday 19 April 2004 02:37 pm, David Neary wrote: > Hi, > > Sven Neumann wrote: > > Dave Neary <[EMAIL PROTECTED]> writes: > > > xcf is a pure-binary format. It is documented in several places - > > > > > > 1) in devel-docs/xcf.txt in the GIMP's CVS > > > 2) in app/xcf/*.[ch] - notably xcf.c/xcf.h which describe the file > > > format and xcf-load and -save which do the reading/writing. > > > 3) in ImageMagick's xcf filter (this will flatten your image and the > > > floating selection, I believe) > > > 4) On Cinepaint's website http://cinepaint.sourceforge.net in the docs > > > section. > > > > Sorry, wrong answer. The right answer is: "You don't parse it." > > I guess we'll have to agree to disagree. "you don't parse it" > doesn't exactly tally with being an open source program. > > Dave.
I think what Sven probably meant is it's very difficult to parse, having to basically rip out the load and save functions, and get all the data definitions right. David -- thanks for the tips, because in my case it's worth the aggravation to be able to parse the data. I've been reviewing xcf.h and xcf.c and it's pretty interesting. It looks to me like an image is basically a list of properties, layers, channels, floating selection, and selections. I'm not sure what a property is, or how it relates to a pixel. I just began to study XcfImage *read_xcf_image( FILE *fp ), and after I fully understand it, I should be able to be able to parse a .xcf file into an outline or something similar, and then pack the outline back into a .xcf file. Thanks Steve Steve Litt Author: * Universal Troubleshooting Process courseware * Troubleshooting Techniques of the Successful Technologist * Rapid Learning: Secret Weapon of the Successful Technologist Webmaster * Troubleshooters.Com * http://www.troubleshooters.com _______________________________________________ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user