Re: [Gimp-user] How to parse an .xcf file?
Hi Steve, Steve Litt wrote: What is the format for a .xcf file, and how do I parse it? 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. Cheers, Dave. -- Dave Neary [EMAIL PROTECTED] ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
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. -- David Neary, Lyon, France E-Mail: [EMAIL PROTECTED] ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
On Monday 19 April 2004 15:37, 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. Actually, I do read it as XCF is to hackish, and only The GIMP can read it. We need to speed-up a new GIMP native format, with a XML Header.; Meanwhile use other image formats, please But that means that by all means, the GIMP should have another file format that could be readable by other apps. What about starting work on this for 2.2, even if it is not going to completly replace .XCF by the time 2.2 is out? We could have an extensible file format that would hold most GIMP image information, and still not be the default file format, if that would be so hard to achieve. I do not recall seeing a new file format in the 2.2 plans Sven wrote up a couple of weeks ago. Dave. ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
Hi, Joao S. O. Bueno [EMAIL PROTECTED] writes: Actually, I do read it as XCF is to hackish, and only The GIMP can read it. We need to speed-up a new GIMP native format, with a XML Header.; Meanwhile use other image formats, please Well, yes, but I wrote that in an earlier reply already. What about starting work on this for 2.2, even if it is not going to completly replace .XCF by the time 2.2 is out? We could have an extensible file format that would hold most GIMP image information, and still not be the default file format, if that would be so hard to achieve. I do not recall seeing a new file format in the 2.2 plans Sven wrote up a couple of weeks ago. The plan wasn't a plan but a request for comments. The new file format we outlined will be strongly dependent on GEGL and it will require decoders to either use GEGL or to implement functionality similar to GEGL. In case you didn't notice, OEyvind Kolaas is working on this and he already came up with a nice subset of what could be the final file format. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
On Monday 19 April 2004 03:01 pm, Sven Neumann wrote: Hi, Joao S. O. Bueno [EMAIL PROTECTED] writes: Actually, I do read it as XCF is to hackish, and only The GIMP can read it. We need to speed-up a new GIMP native format, with a XML Header.; Meanwhile use other image formats, please Well, yes, but I wrote that in an earlier reply already. What about starting work on this for 2.2, even if it is not going to completly replace .XCF by the time 2.2 is out? We could have an extensible file format that would hold most GIMP image information, and still not be the default file format, if that would be so hard to achieve. I do not recall seeing a new file format in the 2.2 plans Sven wrote up a couple of weeks ago. The plan wasn't a plan but a request for comments. The new file format we outlined will be strongly dependent on GEGL and it will require decoders to either use GEGL or to implement functionality similar to GEGL. In case you didn't notice, OEyvind Kolaas is working on this and he already came up with a nice subset of what could be the final file format. I'm just one user of millions, but I hope any new native file format is not binary. Being able to easily manipulate your data with Vim is a very nice plan B, in case it gets in a state Gimp can't handle, or in case one wants to run a script on it. I do this with LyX all the time, including a VimOutliner to LyX conversion script. 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 (Legal Disclaimer) Follow these suggestions at your own risk. ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
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
Re: [Gimp-user] How to parse an .xcf file?
Hi, Steve Litt [EMAIL PROTECTED] writes: 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 also explicitely meant to discourage you and anyone else from attempting to load XCF files. If you need to read them, let GIMP read them for you. The GIMP PDB gives you everything you need to access the data contained in the XCF file. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
Re: [Gimp-user] How to parse an .xcf file?
On Monday 19 April 2004 04:31 pm, Sven Neumann wrote: I also explicitely meant to discourage you and anyone else from attempting to load XCF files. If you need to read them, let GIMP read them for you. The GIMP PDB gives you everything you need to access the data contained in the XCF file. What is the Gimp PDB? 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
Re: [Gimp-user] How to parse an .xcf file?
Hi, Steve Litt [EMAIL PROTECTED] writes: I also explicitely meant to discourage you and anyone else from attempting to load XCF files. If you need to read them, let GIMP read them for you. The GIMP PDB gives you everything you need to access the data contained in the XCF file. What is the Gimp PDB? The GIMP Procedural Database; basically the API that GIMP exports to plug-ins and scripts. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
[Gimp-user] How to parse an .xcf file?
Hi all, I've created a .xcf file in which you cannot turn off the selection. If you want to see it, it's: http://www.stevelitt.com/images/page2.xcf What I'd like to do is go into the actual data with an editor, and manually remove the selection. I'm assuming here that a .xcf file is some sort of compressed markup language, but in fact I can't convert it to text with zless, unzip or gunzip. What is the format for a .xcf file, and how do I parse it? I'm using Gimp version 1.2.5 on Mandrake 9.2. Thanks SteveT 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
Re: [Gimp-user] How to parse an .xcf file?
Hi, Steve Litt [EMAIL PROTECTED] writes: I've created a .xcf file in which you cannot turn off the selection. If you want to see it, it's: http://www.stevelitt.com/images/page2.xcf This file has a floating selection. Either anchor it or turn it into a new layer. There's nothing broken about the file. What I'd like to do is go into the actual data with an editor, and manually remove the selection. I'm assuming here that a .xcf file is some sort of compressed markup language, but in fact I can't convert it to text with zless, unzip or gunzip. What is the format for a .xcf file, and how do I parse it? Don't attempt to parse it. There is no documentation on the file format. It's entirely GIMP's job to deal with this format. Don't try to use it outside the GIMP. Sven ___ Gimp-user mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user