[Bug 294442] New: Ghostscript rendering error involving repeated use of currentpoint and rlineto
https://bugzilla.novell.com/show_bug.cgi?id=294442 Summary: Ghostscript rendering error involving repeated use of currentpoint and rlineto Product: openSUSE 10.2 Version: Final Platform: i686 OS/Version: openSUSE 10.2 Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: lgt1@star.le.ac.uk QAContact: sndirsch@novell.com Found By: --- OVERVIEW ESP Ghostscript 8.15.3 seems to have a rendering bug related to the repeated use of currentpoint and rlineto to draw a curve consisting of many short, separately stroked paths. It looks like some sort of rounding problem, or a coordinate transformation problem between the underlying device coordinate system and user coordinates. A line composed of many short line segments is not drawn accurately, and the resulting graph is obviously incorrect. The problem seems to be resolution-dependent but not device-dependent. STEPS TO REPRODUCE The attached PostScript file test.ps demonstrates the problem. The file is the output of a popular plotting program for scientific data (QDP). The plotted curve stops short, but the exact place depends on the resolution at which the graph is rendered. This is easily seen in 'gv' by increasing the image scale factor and checking the end of the line. METHOD 1: View the attached test.ps file with gv. Examine the right-hand end of the long diagonal line. Using middle mouse button, drag a box around the end of the line and the right-hand vertical scal line, and select a higher magnification from the pop-up menu. Note that the line ends in a different place, and that it has also moved up the screen (slope has changed). METHOD 2: Using 'gs', view the attached file test.ps at two different resolutions: gs -r50 test.ps gs -r100 test.ps ACTUAL RESULTS The long diagonal line segment (actually many small line segments) descending from left to right stops short of the right-hand vertical graph axis (when viewed in landscape mode). It is also too low at the right-hand side (slope is wrong). EXPECTED RESULTS The diagonal line segment should continue all the way to the right-hand graph axis. It should also be higher (less steep slope). BUILD ghostscript-library-8.15.3-24 build date Mon 27 Nov 2006 19:34:23 GMT openSUSE 10.2 on i686 Intel-based PC ADDITIONAL INFORMATION Looking at the source PostScript, it's obvious that the code relies on currentpoint returning an accurate user-space position to start the next line segment. This is perhaps not the best way to code it, but the package that generates it is widespread and sometimes embedded in other software. In any case, I have checked the results with the latest version of GPL Ghostscript (version 8.57). This version of Ghostscript DOES NOT show the error, so its handling of currentpoint/rlineto seems to work differently. I have not tested the recently-released ESP Ghostscript 8.15.4, so I do not know if this has a bug fix for the problem. The error does not seem to be dependent on the device driver, only on the resolution. Printing on a 1200 DPI printer gives the approximately the expected output, but previewing on the screen or rendering into a GIF or PNG file at normal resolutions is noticeably wrong. Now that ESP and GPL Ghostscript are merging, perhaps it would be possible to include an updated Ghostscript in openSUSE 10.3. A bug fix for 10.2 would be very useful as well - maybe ESP 8.15.4 would fix things. The software that generated this plot is in use by many astronomers and scientists worldwide, and is often used to generate GIF or PNG files for presentations or journal publications. I have attached the PostScript file test.ps to this bug report, along with four different renderings of the same file using ESP and GPL Ghostscript, at 50 dpi and 100 dpi. Displaying the PNG files with, eg, 'display' shows the problem clearly in the top-left-hand corner of the plots (which are oriented in portrait mode in the PNG versions). The command used to generate these plots was (for example 50 dpi, ESP ghostscript): gs -q -r50 -sDEVICE=png16m -dGraphicsAlphaBits=4 -sOutputFile=esp_050_dpi.png test.png The files: test.ps The PostScript source file esp_050_dpi.png ESP Ghostscript 8.15.3 (2006-04-19) 50 dpi esp_100_dpi.png ESP Ghostscript 8.15.3 (2006-04-19) 100 dpi gpl_050_dpi.png GPL Ghostscript 8.57 (2007-05-11) 50 dpi gpl_100_dpi.png GPL Ghostscript 8.57 (2007-05-11) 100 dpi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=294442#c1
--- Comment #1 from Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c2
--- Comment #2 from Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c3
--- Comment #3 from Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c4
--- Comment #4 from Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c5
--- Comment #5 from Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442
Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442
Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c6
Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442
Cristian Rodriguez
https://bugzilla.novell.com/show_bug.cgi?id=294442#c7
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c8
--- Comment #8 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c9
--- Comment #9 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c10
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c11
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c12
--- Comment #12 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c13
Laurence Tyler
https://bugzilla.novell.com/show_bug.cgi?id=294442#c14
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=294442#c15
--- Comment #15 from Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com