Using: gs -q -dBATCH -dNOPAUSE -dSAFER -r72 -dEPSCrop -sDEVICE=png16m -dGraphicsAlphaBits=4 -sOutputFile=bb.png bb.ps spurious lines are rendered. Below is a test case: %!PS-Adobe-1.0 EPSF-1.2 %%BoundingBox: 77 110 668 581 %%Pages: 1 %%PageOrder: Ascend %%PaperSize: A4 %%PageOrientation: Landscape %%DocumentFonts: %%EndComments %%BeginProlog /bdef {bind def} bind def /c {setrgbcolor} bdef /w {setlinewidth} bdef /P {% Lay out a polygon % usage: x_n y_n x_n-1 y_n-1 ... x_0 y_0 n P 3 1 roll moveto {rlineto} repeat} bdef /F {P fill newpath} bdef %Fill a polygon %Define line widths /w0 {1 w} bdef %Define colors: /c5 {0 0.78 0.78 c} bdef /c14 {0.42 0 0.86 c} bdef %%EndProlog %%BeginSetup 1 setlinecap 1 setlinejoin %%EndSetup %%Page: 1 1 71 109 translate %move origin slightly in 0.113400 0.113400 scale % Units: 1000 = 2 cm w0 % c14 blue c5 green % bottom c5 -2436 0 0 -350 2436 0 0 350 1124 1716 4 F % top c14 -3774 0 0 -350 3774 0 0 350 463 2066 4 F c5 -2436 0 0 -350 2436 0 0 350 1124 2066 4 F showpage %%Trailer %%EOF
I confirm that this problem exists in all versions tested from 6.61 to the current CVS. The problem appears to be related to anti-aliasing logic.
This is what happens when you antialias on a tight gap. The background can bleed through.
Please add a note in the documentation. I took me a while to trace the problem to antialising.
This problem should probably be documented in Issues.htm or somewhere else appropriate in the documentation.
Issues isn't really a good place for this I think, since it's not really a bug. I'll add a note next to GraphicsAlphaBits.
Note that ImageMagick uses ghostscript as postscript generator and set by default -dGraphicsAlphaBits=4 in a fairly well hidden config file which is not user modifiable (that is without root access). From http://www.cs.wisc.edu/~ghost/doc/cvs/Use.htm#Rendering_parameters, <quote> -dTextAlphaBits=n -dGraphicsAlphaBits=n These options control the use of subsample antialiasing. Their use is highly recommended for producing high quality rasterizations. The subsampling box size n should be 4 for optimum output, but smaller values can be used for faster rendering. Antialiasing is enabled separately for text and graphics content. Allowed values are 1, 2 or 4. </quote> Please mention that -dGraphicsAlphaBits=n may produce undesirable results and may not consequently be "highly recommended". Regards,
It's still highly recommended, it's just that one occasionally encounters files that depend on a particular rendering behavior. In any case, I've added a warning to the documentation.
*** Bug 687789 has been marked as a duplicate of this bug. ***