Bug 688243 - Spurious lines between joined filled rectangles and antialiasing
Summary: Spurious lines between joined filled rectangles and antialiasing
Status: RESOLVED DUPLICATE of bug 689557
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.50
Hardware: PC Linux
: P3 normal
Assignee: Ralph Giles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-27 07:05 UTC by Petr Mikulik
Modified: 2007-12-13 12:55 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
ps file drawing manually some filled rectangles (1.99 KB, application/postscript)
2005-07-27 07:21 UTC, Petr Mikulik
Details
foo.ps -- modified sample (2.01 KB, text/plain)
2005-07-27 13:10 UTC, Alex Cherepanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Mikulik 2005-07-27 07:05:27 UTC
 
Comment 1 Petr Mikulik 2005-07-27 07:21:12 UTC
Created attachment 1574 [details]
ps file drawing manually some filled rectangles
Comment 2 Petr Mikulik 2005-07-27 07:32:05 UTC
On gnuplot-beta@lists.sourceforge.net, there is a discussion about ghostscript's
bug which influences plots (maps) with adjacent filled rectangles and
antialiasing with "-dGraphicsAlphaBits=4". See the mailing group archive of July
2005
   http://sourceforge.net/mailarchive/forum.php?thread_id=7783155&forum_id=6027

and messages entitled
   spurious lines in gs with antialiasing
   /f + /h, color box

To reproduce the bug: draw the enclosed attachment in ghostview, and set
"antialiasing" on. If you don't see spurious white/yellowish lines in between
gray rectangles, then change the resolution/scale.


Another way to reproduce it easily is to raster the ps file to png, by a script
like this:


a=demo3.ps

#A="-dTextAlphaBits=4 -dGraphicsAlphaBits=4"
#A="-dTextAlphaBits=4"
A="-dGraphicsAlphaBits=4"

# Choose either of two:
D=png16m
#D=png256

gs8 -q -r20 $A -sDEVICE=$D \
        -dSAFER -dNOPAUSE -dBATCH -sOutputFile=$a.png $a -quit

#ps2pdf $A $a $a.pdf


You can play with the definition of "/F" in the demo file. When using
  /F {closepath gsave stroke grestore fill} def
then it is less visible than without stroke.

The bug has been confirmed on gs 7.07.x, 8.50.
It is not present in Adobe Distiller.

In gnuplot 4.0, you create a ps file showing the error by commands:
set pm3d map
set samples 200,200
set isosamples 100,100
splot x

set term post color; set out 'a.ps'
replot
set term pop; set out

See the map or the colorbox on the right.


Could ghostscript fix this bug?
How can we change the ps code produced by gnuplot so that the bug it not
apparent even for current gs versions? Is there something like "gs should not
antialias this section"?

Users complain that the colorbox looks ugly when they have antialiasing switched on.
Comment 3 Alex Cherepanov 2005-07-27 13:10:25 UTC
Created attachment 1578 [details]
foo.ps -- modified sample

This is an old and rather difficult to fix issue. See the bug 687742 for the
discussion. gnuplot can try to write adjacent boxes in the single fill
operation but this is not possible when the bxes have different colors.
See the modified sample file.
Comment 4 Petr Mikulik 2005-07-28 00:32:46 UTC
We need to draw a colour map, i.e. all rectangles/quadrangles have different colour.

Isn't there any other possibility how to change gs's GraphicsAlphaBits from
within the postscript code, or to disable the antialiasing within a given part
of the ps file?
Comment 5 Ralph Giles 2007-11-14 17:35:05 UTC
I can't remember what the resolution of this bug was supposed to be, but the
issue is being discussed again in Bug 689557. Closing this one in favor of the
newer one.

*** This bug has been marked as a duplicate of 689557 ***