From: Ariya H. <ar...@kd...> - 2006-06-06 01:45:45
|
---------- Forwarded message ---------- From: Ariya Hidayat <ari...@gm...> Date: Jun 5, 2006 3:38 PM Subject: SoC WPG conversion: progress as of June 5, 2006 To: de...@wp... Hi folks, Here's the status so far with my Summer of Code (WPG conversion filter). In the first week I spent time studying the WordPerfect Graphics file format. Seems that the format is not so difficult to understand. I tried to create few simple graphics in WordPerfect Office and examined the hexviewed version to get a feeling of the format. I also setup my working environment, intended to work as close as possible with WPO (for convenience, as I'd need to create/edit/modify/view lots of WPG files). First, I was using MinGW so that I can work in Win32. Later on I was succesful at setting up a virtualized Windows NT + WPO using QEMU inside my SUSE box. This is better as Linux is my preferred development platform. As starting point, I continue the development of libwpg with focus on WPG2 format. As my mentor (Fridrich Strba) has expressed, removing libgsf dependency is a good jump start so I did this. I also implemented few important WPG records, among others for handling pen and brush settings as well as basic shapes such as rectangle, polyline and polygon. Difficulties come from the object characterization data, which specifies e.g. the object transformation. Here the documentation is not clear and sometimes also has errors, but I'm working on it. To test the parsing routine, I also adjusted the listener class of WPG. Typically, one would create a new class derived from this listener and then e.g. implemented SVG output. I modified the listener to fit better the common painting model (as used in PostScript/Cairo/Qt) so that in the future it should be easy to create e.g. a PDF output. The wpg2svg conversion tool also got some love. I already implemented stroke color, opacity, dasharray, width. Along with some basic shapes such as line, polyline, rectangle (even with roundness), I can already view some WPG files converted to SVG using Inkscape and Karbon. Unfortunately so far I still work off the CVS (of libwpg). My code is still a mess and breaks WPG1 support. Of course, merging and syncing back the code is on my radar and I hope I can do this as soon as possible. Next on my plan is: - complete the brush properties - object characterization data, necessary for correct transformation - adjust WPG1 code with the new listener's painting model Regards, Ariya Hidayat |
From: Fridrich S. <fri...@bl...> - 2006-06-06 07:11:43
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Robert, Robert Steinmetz wrote: > You mention WPG1 and WPG2. I'm not clear on the meaning of these > designations. Are they flavors or sequential versions? Although my limited English is not understanding the difference between flavours and sequential versions, I might have the information that you ask for in this one :-) WPG1 is the WordPerfect Graphics file format version one as used in documents produced by WordPerfect 5.x (or other Corel applications). WPG2 is the WordPerfect Graphics file format version two that is used in documents produced by WordPerfect 6.0 and subsequent versions. Although the two can have some common logic (the apple is never falling too far from the apple tree), they have such difference that a parser parsing one format cannot parse the other. The record structure is slightly different, but the most important, the way records are chained is quite novel in WPG2. I hope this answers this part of the question > I have understood that wpg files, in every version, come in two flavors, > raster and vector. If that is the case, is it the intent of this project > to develop a converter for both? Both WPG1 and WPG2 files *can* contain in the same time vector graphics, bitmap data and embedded graphics of other mime-types. In WPG1, there are two sorts of bitmap records. Although, it is possible that some documents will contain only one type of data, it is not the rule and a parser designed to read WPG cannot assume this. > I had understood that the initial effort was directed first at the > raster flavor. That clearly has implications for the type output of the > filter can create. Raster and vector files are very different and most > file formats are either one or the other. The work done before Ariya started his SoC project was mainly to convert the vector graphics information inside WPG1 files, since it was kind of easier. Libwpg CVS has a tool called wpg2svg that allows to visualize the result of this conversion in applications that support SVG. Although, SVG is primary designed to contain vector graphics, it can embed also bitmap graphics, as can be seen in this proof-of-concept document: http://hei.unige.ch/~strba5/mmeeks/fridrich-base64.svg :-) I see now that Ariya also answered your questions. But I will hit the "Send" button anyway ;-) Cheers Fridrich -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEhSqYu9a1imXPdA8RAr2rAKCGa/rs5YN23rG2xEYJxVS4xgQ2KgCdFd2w cqIfwXlxbsSYhLZ5FUUi8E8= =6OMm -----END PGP SIGNATURE----- |
From: Robert S. A. <ro...@st...> - 2006-06-06 16:39:13
Attachments:
rob.vcf
|
Thanks, Its a lot cleared now. I misunderstood how the wpg was set up. Fridrich Strba wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, Robert, > > Robert Steinmetz wrote: > >> You mention WPG1 and WPG2. I'm not clear on the meaning of these >> designations. Are they flavors or sequential versions? >> > > Although my limited English is not understanding the difference between > flavours and sequential versions, I might have the information that you > ask for in this one :-) It was a clumsy attempt to explain that there might be two types of wpg files (vector and raster) as well as old and new version of wpg files. You have clarified quite well that there is only one type (flavor) and that WPG2 is the successor to WPG1. Thanks -- Robert Steinmetz, AIA Principal Steinmetz & Associates |