From: Fridrich S. <fri...@bl...> - 2005-01-28 10:31:23
|
I just added the wpg2svg, in order to be able to have some real life images. For the while it only creates an empty image of the size of the WPG1 file. For WPG2, the image size is 0x0, but is it a valid SVG :-) Frankly, this looks like in 2 months of _payed_ full time work, one could have made it convert both formats in a really good way (put aside some embedded PlanPerfect or other proprietary elements). uwog, how do you understand the talk about image precision in the WPG2 documentation? I am really lost in the ranges they mention. BTW, is there somewhere a really good WPG1 documentation? Cheers Fridrich Conversion of WPG1 image size; Adding SVG listener (wpg2svg) CVS: ---------------------------------------------------------------------- CVS: Enter Log. Lines beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: configure.in src/conv/Makefile.am src/conv/raw/.cvsignore CVS: src/conv/raw/main.cpp src/lib/Makefile.am CVS: src/lib/WPG1Parser.cpp src/lib/WPG1Parser.h CVS: src/lib/WPG2Parser.cpp src/lib/wpglistener.h CVS: Added Files: CVS: src/conv/svg/.cvsignore src/conv/svg/Makefile.am CVS: src/conv/svg/main.cpp src/conv/svg/wpg2svg.rc.in CVS: ---------------------------------------------------------------------- |
From: J.M. M. <j.m...@st...> - 2005-01-29 02:21:30
|
Op vr, 28-01-2005 te 11:31 +0100, schreef Fridrich Strba: > I just added the wpg2svg, in order to be able to have some real life > images. For the while it only creates an empty image of the size of the > WPG1 file. For WPG2, the image size is 0x0, but is it a valid SVG :-) > > Frankly, this looks like in 2 months of _payed_ full time work, one > could have made it convert both formats in a really good way (put aside > some embedded PlanPerfect or other proprietary elements). > > uwog, how do you understand the talk about image precision in the WPG2 > documentation? I am really lost in the ranges they mention. I might look into it this weekend.. wpd2svg might be fun to hack on...! > BTW, is there somewhere a really good WPG1 documentation? I never found the complete documentation. I think we both have the same docs... Marc |
From: Fridrich S. <fri...@bl...> - 2005-01-29 06:19:01
|
Marc, J.M. Maurer wrote: >>uwog, how do you understand the talk about image precision in the WPG2 >>documentation? I am really lost in the ranges they mention. > I might look into it this weekend.. wpd2svg might be fun to hack on...! It definitely is. That is the reason why I created it. This allows us to actually see what we are converting. Very rewarding. The next step is to convert the line and fill attributes (line width, line colour, fill pattern fill colour,...) and maybe a correct conversion of ellipse fragments (we read it, but I did not find in SVG specs how to do it actually) and the non-bitmap images from "testdoc" will be looking gorgeous. I was thinking about converting first all vector graphics elements in both formats and then attack the bitmap and maybe postscript stuff. The unclear part is: The units of WPG coordinate data are stored in the Start WPG record. Coordinate data values are signed values indicating a location within a two-dimensional, right-hand, Cartesian coordinate system. Positive X and Y values are located to the right and above the image origin. Single-precision positional data uses short integer values ranging from 32768 to 32767. Double-precision positional data uses fixed-point values ranging from 32768.00000 to 32767.99998. Double-precision data is stored in long integer formats. Although double-precision positional data is defined by the format, Corel products (as currently implemented) use the fractional portion for rounding only. Therefore, positional data must not be defined in a small range (such as 0.21 to 1). Maybe it is me who did not understand the ranges going from bigger to smaller. Did they forget signs, but then signs are not needed in coordinates, since WPG starts from (0,0) and ends at (width,height). BTW: do not surprised if the svg images are upside down. The default coordinates of svg go from left-up and WPG from left-down. >>BTW, is there somewhere a really good WPG1 documentation? > I never found the complete documentation. I think we both have the same > docs... One can do with it for the while, but... BTW, the default palette of WPG1 and WPG2 is the same thing. I found it out. |